From 5fb02b3f417dadbfc8b855320970e84b88148b90 Mon Sep 17 00:00:00 2001 From: Sky Date: Wed, 22 Nov 2023 16:25:09 -0500 Subject: [PATCH] dont use ? in unwrap! we don't need the implicit .into() and it breaks some inference --- src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 3da60dd..f4e2a32 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,7 +13,11 @@ use std::{env, fs}; macro_rules! unwrap { ($x:expr, $($fmt:tt)+) => { - anyhow::Context::with_context($x, || format!($($fmt)+))? + // dont use ? because we don't need the implicit .into() and it breaks some inference + match anyhow::Context::with_context($x, || format!($($fmt)+)) { + Ok(x) => x, + Err(e) => return Err(e), + } }; }