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
2 changed files with 3 additions and 3 deletions

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)