From ef5321fce597a5633425ce25ea4582ff06071d31 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 26 Aug 2019 13:33:51 +0200 Subject: cargo fix ('dyn' keywords) --- rust/src/auth.rs | 2 +- rust/src/endpoints.rs | 58 +++++++++++++++++++++++++-------------------------- 2 files changed, 30 insertions(+), 30 deletions(-) (limited to 'rust') diff --git a/rust/src/auth.rs b/rust/src/auth.rs index 1f0a1193..1a006ffd 100644 --- a/rust/src/auth.rs +++ b/rust/src/auth.rs @@ -101,7 +101,7 @@ impl iron::Error for AuthError { fn description(&self) -> &str { &self.msg } - fn cause(&self) -> Option<&iron::Error> { + fn cause(&self) -> Option<&dyn iron::Error> { None } } diff --git a/rust/src/endpoints.rs b/rust/src/endpoints.rs index 96a4700b..a762fe18 100644 --- a/rust/src/endpoints.rs +++ b/rust/src/endpoints.rs @@ -83,7 +83,7 @@ macro_rules! wrap_entity_handlers { expand: Option, hide: Option, _context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let conn = self.db_pool.get().expect("db_pool error"); // No transaction for GET let ret = match (|| { @@ -114,7 +114,7 @@ macro_rules! wrap_entity_handlers { editgroup_id: String, entity: models::$model, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let conn = self.db_pool.get().expect("db_pool error"); let ret = match conn.transaction(|| { let editgroup_id = FatcatId::from_str(&editgroup_id)?; @@ -138,7 +138,7 @@ macro_rules! wrap_entity_handlers { &self, auto_batch: $auto_batch_type, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let conn = self.db_pool.get().expect("db_pool error"); let ret = match conn.transaction(|| { let auth_context = self.auth_confectionary.require_auth(&conn, &context.auth_data, Some(stringify!($post_auto_batch_fn)))?; @@ -180,7 +180,7 @@ macro_rules! wrap_entity_handlers { ident: String, entity: models::$model, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let conn = self.db_pool.get().expect("db_pool error"); let ret = match conn.transaction(|| { let editgroup_id = FatcatId::from_str(&editgroup_id)?; @@ -206,7 +206,7 @@ macro_rules! wrap_entity_handlers { editgroup_id: String, ident: String, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let conn = self.db_pool.get().expect("db_pool error"); let ret = match conn.transaction(|| { let editgroup_id = FatcatId::from_str(&editgroup_id)?; @@ -232,7 +232,7 @@ macro_rules! wrap_entity_handlers { ident: String, limit: Option, _context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let conn = self.db_pool.get().expect("db_pool error"); // No transaction for GET? let ret = match (|| { @@ -252,7 +252,7 @@ macro_rules! wrap_entity_handlers { expand: Option, hide: Option, _context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let conn = self.db_pool.get().expect("db_pool error"); // No transaction for GET? let ret = match (|| { @@ -282,7 +282,7 @@ macro_rules! wrap_entity_handlers { &self, edit_id: String, _context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let conn = self.db_pool.get().expect("db_pool error"); // No transaction for GET? let ret = match (|| { @@ -301,7 +301,7 @@ macro_rules! wrap_entity_handlers { editgroup_id: String, edit_id: String, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let conn = self.db_pool.get().expect("db_pool error"); let ret = match conn.transaction(|| { let editgroup_id = FatcatId::from_str(&editgroup_id)?; @@ -333,7 +333,7 @@ macro_rules! wrap_entity_handlers { &self, ident: String, _context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let conn = self.db_pool.get().expect("db_pool error"); // No transaction for GET? let ret = match (|| { @@ -360,7 +360,7 @@ macro_rules! wrap_lookup_handler { expand: Option, hide: Option, _context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let conn = self.db_pool.get().expect("db_pool error"); let expand_flags = match expand { None => ExpandFlags::none(), @@ -387,7 +387,7 @@ macro_rules! wrap_fcid_handler { &self, id: String, _context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let conn = self.db_pool.get().expect("db_pool error"); // No transaction for GET let ret = match (|| { @@ -410,7 +410,7 @@ macro_rules! wrap_fcid_hide_handler { id: String, hide: Option, _context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let conn = self.db_pool.get().expect("db_pool error"); // No transaction for GET let ret = match (|| { @@ -656,7 +656,7 @@ impl Api for Server { expand: Option, hide: Option, _context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let conn = self.db_pool.get().expect("db_pool error"); let expand_flags = match expand { None => ExpandFlags::none(), @@ -692,7 +692,7 @@ impl Api for Server { expand: Option, hide: Option, _context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let conn = self.db_pool.get().expect("db_pool error"); let expand_flags = match expand { None => ExpandFlags::none(), @@ -735,7 +735,7 @@ impl Api for Server { editor_id: String, editor: models::Editor, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let conn = self.db_pool.get().expect("db_pool error"); let ret = match conn .transaction(|| { @@ -780,7 +780,7 @@ impl Api for Server { before: Option>, since: Option>, _context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let conn = self.db_pool.get().expect("db_pool error"); let ret = match conn .transaction(|| { @@ -809,7 +809,7 @@ impl Api for Server { before: Option>, since: Option>, _context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let conn = self.db_pool.get().expect("db_pool error"); let ret = match conn .transaction(|| { @@ -832,7 +832,7 @@ impl Api for Server { &self, editgroup_id: String, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let conn = self.db_pool.get().expect("db_pool error"); let ret = match conn .transaction(|| { @@ -865,7 +865,7 @@ impl Api for Server { &self, editgroup_id: String, _context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let conn = self.db_pool.get().expect("db_pool error"); let ret = match conn .transaction(|| { @@ -885,7 +885,7 @@ impl Api for Server { editgroup_id: String, expand: Option, _context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let conn = self.db_pool.get().expect("db_pool error"); let ret = match conn .transaction(|| { @@ -924,7 +924,7 @@ impl Api for Server { before: Option>, since: Option>, _context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let conn = self.db_pool.get().expect("db_pool error"); let ret = match conn .transaction(|| { @@ -954,7 +954,7 @@ impl Api for Server { &self, entity: models::Editgroup, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let conn = self.db_pool.get().expect("db_pool error"); let ret = match conn.transaction(|| { let auth_context = self.auth_confectionary.require_auth( @@ -1008,7 +1008,7 @@ impl Api for Server { editgroup: models::Editgroup, submit: Option, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let conn = self.db_pool.get().expect("db_pool error"); let ret = match conn .transaction(|| { @@ -1048,7 +1048,7 @@ impl Api for Server { editgroup_id: String, annotation: models::EditgroupAnnotation, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let conn = self.db_pool.get().expect("db_pool error"); let ret = match conn.transaction(|| { let auth_context = self.auth_confectionary.require_auth( @@ -1089,7 +1089,7 @@ impl Api for Server { &self, limit: Option, _context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let conn = self.db_pool.get().expect("db_pool error"); // No transaction for GET let ret = match self @@ -1113,7 +1113,7 @@ impl Api for Server { &self, id: i64, _context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let conn = self.db_pool.get().expect("db_pool error"); // No transaction for GET let ret = match self @@ -1130,7 +1130,7 @@ impl Api for Server { &self, params: models::AuthOidc, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let conn = self.db_pool.get().expect("db_pool error"); let ret = match conn .transaction(|| { @@ -1178,7 +1178,7 @@ impl Api for Server { &self, role: Option, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let conn = self.db_pool.get().expect("db_pool error"); let ret = match conn .transaction(|| { -- cgit v1.2.3