From 909a1749573e602c06e5d8537de17bd06411d228 Mon Sep 17 00:00:00 2001 From: Greg V Date: Mon, 2 May 2022 00:11:05 +0300 Subject: [PATCH] fix build on nightly rust error[E0106]: missing lifetime specifier --> base/time.rs:26:68 | 26 | fn fixed_len_num<'a>(len: usize) -> impl FnMut(&'a str) -> IResult<&'a str, i32> { | ^ expected named lifetime parameter | = help: this function's return type contains a borrowed value with an elided lifetime, but the lifetime cannot be derived from the arguments help: consider using the `'a` lifetime --- server/base/time.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/base/time.rs b/server/base/time.rs index 3f98328..43a1f4e 100644 --- a/server/base/time.rs +++ b/server/base/time.rs @@ -23,7 +23,7 @@ pub const TIME_UNITS_PER_SEC: i64 = 90_000; pub struct Time(pub i64); /// Returns a parser for a `len`-digit non-negative number which fits into an i32. -fn fixed_len_num<'a>(len: usize) -> impl FnMut(&'a str) -> IResult<&'a str, i32> { +fn fixed_len_num<'a>(len: usize) -> impl FnMut(&'a str) -> IResult<'a, &'a str, i32> { map_res( take_while_m_n(len, len, |c: char| c.is_ascii_digit()), |input: &str| input.parse::(),