Skip to content

Commit

Permalink
clippy: Suppress borrow warning in ErrorRef test
Browse files Browse the repository at this point in the history
The weird borrowing magic is part of the point (PR #328)
  • Loading branch information
Techcable committed Jan 3, 2024
1 parent dfb3d84 commit 4bcbec2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3388,6 +3388,7 @@ fn test_error_tag_wrapper() {
}
impl std::error::Error for MyError {}
let e = MyError("everything is on fire");
#[allow(clippy::needless_borrow)] // The "needless" borrow is part of the point
assert_eq!((&&ErrorTagWrapper(e)).slog_error_kind(), ErrorValueTag);
let e = &e;
assert_eq!((&&ErrorTagWrapper(e)).slog_error_kind(), ErrorRefTag);
Expand Down

0 comments on commit 4bcbec2

Please sign in to comment.