mirror of https://github.com/zkat/miette.git
Fix `dead_code` warnings in tests.
Protect code used in some tests based on features with feature checks.
This commit is contained in:
parent
9284776a08
commit
a279561d9b
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue