From 20c5cf5a8b9acf98db7487ab49de8dcbc1ddb2f9 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 7 Sep 2018 19:36:11 -0700 Subject: fix/replace a lot of expect() calls --- rust/src/api_server.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'rust/src/api_server.rs') diff --git a/rust/src/api_server.rs b/rust/src/api_server.rs index ecf0c242..57aeebea 100644 --- a/rust/src/api_server.rs +++ b/rust/src/api_server.rs @@ -49,7 +49,7 @@ macro_rules! count_entity { fn make_edit_context(conn: &DbConn, editgroup_id: Option) -> Result { let editor_id = Uuid::parse_str("00000000-0000-0000-AAAA-000000000001")?; // TODO: auth let editgroup_id = match editgroup_id { - None => FatCatId::from_uuid(&get_or_create_editgroup(editor_id, conn).expect("current editgroup")), + None => FatCatId::from_uuid(&get_or_create_editgroup(editor_id, conn)?), Some(param) => param, }; Ok(EditContext { @@ -386,8 +386,7 @@ impl Server { editgroup::description.eq(entity.description), editgroup::extra_json.eq(entity.extra), )) - .get_result(conn) - .expect("error creating edit group"); + .get_result(conn)?; Ok(Editgroup { id: Some(uuid2fcid(&row.id)), -- cgit v1.2.3