From 4bcbec279d95401745d11f9041e65a133bc17b51 Mon Sep 17 00:00:00 2001 From: Techcable Date: Tue, 2 Jan 2024 20:57:19 -0700 Subject: [PATCH] clippy: Suppress borrow warning in ErrorRef test The weird borrowing magic is part of the point (PR #328) --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index f5bec3dd..84b4ba5c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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);