Improve lifetimes for get_property_numeric.

This commit is contained in:
Tom Alexander 2023-10-02 15:51:29 -04:00
parent e7ec23af3d
commit c55fae86f8
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 3 additions and 3 deletions

View File

@ -2118,7 +2118,7 @@ fn compare_timestamp<'b, 's>(
_source: &'s str,
emacs: &'b Token<'s>,
rust: &'b Timestamp<'s>,
) -> Result<DiffEntry<'b, 's>, Box<dyn std::error::Error>> {
) -> Result<DiffEntry<'b, 's>, Box<dyn std::error::Error + 's>> {
let mut this_status = DiffStatus::Good;
let mut message = None;

View File

@ -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<Option<N>, Box<dyn std::error::Error>>
) -> Result<Option<N>, Box<dyn std::error::Error + 's>>
where
<N as FromStr>::Err: std::error::Error,
<N as FromStr>::Err: 'static,
<N as FromStr>::Err: 's,
{
let foo = get_property(emacs, key)?
.map(Token::as_atom)