Allow dead code in test code
This commit is contained in:
parent
1e3193ebb2
commit
d9c1ef482b
1 changed files with 4 additions and 0 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue