Normalize panic message

Change all unwrap to expect
Normalize expect's messages
Don't panic where it could be avoided easily
This commit is contained in:
Trinity Pointard
2018-10-20 08:44:33 +02:00
parent 9d70eeae61
commit 4e6f3209d5
18 changed files with 279 additions and 252 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ pub trait FromActivity<T: Object, C>: Sized {
fn try_from_activity(conn: &C, act: Create) -> bool {
if let Ok(obj) = act.create_props.object_object() {
Self::from_activity(conn, obj, act.create_props.actor_link::<Id>().unwrap());
Self::from_activity(conn, obj, act.create_props.actor_link::<Id>().expect("FromActivity::try_from_activity: id not found error"));
true
} else {
false