From d6dc68554942f3c2f2cb79216dfe06c5dd5b25e3 Mon Sep 17 00:00:00 2001 From: chrysn Date: Tue, 26 Nov 2024 18:41:42 +0100 Subject: [PATCH] expect(): Track caller --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index b6e42c4..9523dfb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -687,6 +687,7 @@ impl CtOption { /// /// Panics if the value is none with a custom panic message provided by /// `msg`. + #[track_caller] pub fn expect(self, msg: &str) -> T { assert_eq!(self.is_some.unwrap_u8(), 1, "{}", msg);