diff --git a/libimagerror/src/error_gen.rs b/libimagerror/src/error_gen.rs index e46ce184..38cb1590 100644 --- a/libimagerror/src/error_gen.rs +++ b/libimagerror/src/error_gen.rs @@ -242,11 +242,15 @@ mod test { generate_error_imports!(); + #[allow(dead_code)] generate_custom_error_types!(CustomTestError, CustomTestErrorKind, CustomData, CustomErrorKindA => "customerrorkind a", CustomErrorKindB => "customerrorkind B"); + // Allow dead code here. + // We wrote this to show that custom test types can be implemented. + #[allow(dead_code)] impl CustomTestError { pub fn test(&self) -> i32 { match self.custom_data { @@ -412,7 +416,7 @@ mod test { let something : Option = None; match something.ok_or_errkind(TestErrorKind::TestErrorKindA) { Ok(_) => assert!(false), - Err(e) => assert!(true), + Err(_) => assert!(true), } }