summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2017-01-25 19:36:59 +0100
committerGitHub <noreply@github.com>2017-01-25 19:36:59 +0100
commit71e1a4cd61ad7748a252c77bb9c9eaa4ab01934e (patch)
tree61c4df5e3b30b94d37b8f95eb98811afaf5b97e8
parent1e3193ebb2028478aa26efd1b69697cddf00914f (diff)
parente0e6e0c1174cd15f69a2b4396daadf565cd7a601 (diff)
downloadimag-71e1a4cd61ad7748a252c77bb9c9eaa4ab01934e.zip
imag-71e1a4cd61ad7748a252c77bb9c9eaa4ab01934e.tar.gz
Merge pull request #874 from matthiasbeyer/libimagerror/fix-warnings
Libimagerror/fix warnings
-rw-r--r--libimagerror/src/error_gen.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/libimagerror/src/error_gen.rs b/libimagerror/src/error_gen.rs
index e46ce18..38cb159 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<i32> = None;
match something.ok_or_errkind(TestErrorKind::TestErrorKindA) {
Ok(_) => assert!(false),
- Err(e) => assert!(true),
+ Err(_) => assert!(true),
}
}