Allow dead code in test code

This commit is contained in:
Matthias Beyer 2017-01-25 18:36:59 +01:00
parent 1e3193ebb2
commit d9c1ef482b
1 changed files with 4 additions and 0 deletions

View File

@ -242,11 +242,15 @@ mod test {
generate_error_imports!(); generate_error_imports!();
#[allow(dead_code)]
generate_custom_error_types!(CustomTestError, CustomTestErrorKind, generate_custom_error_types!(CustomTestError, CustomTestErrorKind,
CustomData, CustomData,
CustomErrorKindA => "customerrorkind a", CustomErrorKindA => "customerrorkind a",
CustomErrorKindB => "customerrorkind B"); CustomErrorKindB => "customerrorkind B");
// Allow dead code here.
// We wrote this to show that custom test types can be implemented.
#[allow(dead_code)]
impl CustomTestError { impl CustomTestError {
pub fn test(&self) -> i32 { pub fn test(&self) -> i32 {
match self.custom_data { match self.custom_data {