Merge pull request #874 from matthiasbeyer/libimagerror/fix-warnings
Libimagerror/fix warnings
This commit is contained in:
commit
71e1a4cd61
1 changed files with 5 additions and 1 deletions
|
@ -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<i32> = None;
|
||||
match something.ok_or_errkind(TestErrorKind::TestErrorKindA) {
|
||||
Ok(_) => assert!(false),
|
||||
Err(e) => assert!(true),
|
||||
Err(_) => assert!(true),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue