Fix `dead_code` warnings in tests.

Protect code used in some tests based on features with feature
checks.
This commit is contained in:
Bruce Mitchener 2024-08-06 09:30:05 +07:00
parent 9284776a08
commit a279561d9b
1 changed files with 2 additions and 0 deletions

View File

@ -154,6 +154,7 @@ fn test_diagnostic_source_is_output() {
assert_eq!(expected, out);
}
#[cfg(feature = "fancy-no-backtrace")]
#[derive(Debug, miette::Diagnostic, thiserror::Error)]
#[error("A nested error happened")]
struct NestedError {
@ -212,6 +213,7 @@ fn test_nested_diagnostic_source_is_output() {
assert_eq!(expected, out);
}
#[cfg(feature = "fancy-no-backtrace")]
#[derive(Debug, miette::Diagnostic, thiserror::Error)]
#[error("A multi-error happened")]
struct MultiError {