From c55fae86f848ce6aff7712157f218b730c97023c Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Mon, 2 Oct 2023 15:51:29 -0400 Subject: [PATCH] Improve lifetimes for get_property_numeric. --- src/compare/diff.rs | 2 +- src/compare/util.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compare/diff.rs b/src/compare/diff.rs index 745f556..f0a1b8d 100644 --- a/src/compare/diff.rs +++ b/src/compare/diff.rs @@ -2118,7 +2118,7 @@ fn compare_timestamp<'b, 's>( _source: &'s str, emacs: &'b Token<'s>, rust: &'b Timestamp<'s>, -) -> Result, Box> { +) -> Result, Box> { let mut this_status = DiffStatus::Good; let mut message = None; diff --git a/src/compare/util.rs b/src/compare/util.rs index 6f1c922..0a96f49 100644 --- a/src/compare/util.rs +++ b/src/compare/util.rs @@ -243,10 +243,10 @@ pub(crate) fn get_property_boolean<'b, 's, 'x>( pub(crate) fn get_property_numeric<'b, 's, 'x, N: FromStr>( emacs: &'b Token<'s>, key: &'x str, -) -> Result, Box> +) -> Result, Box> where ::Err: std::error::Error, - ::Err: 'static, + ::Err: 's, { let foo = get_property(emacs, key)? .map(Token::as_atom)