diff --git a/ascii/src/lib.rs b/ascii/src/lib.rs index 92cad5fc..09168298 100644 --- a/ascii/src/lib.rs +++ b/ascii/src/lib.rs @@ -97,7 +97,7 @@ fn get_min_start_max_end(lines: &[&str]) -> (usize, usize) { /// Produces a series of lines which have been automatically truncated to the /// correct width -impl<'a> Iterator for AsciiArt<'a> { +impl Iterator for AsciiArt<'_> { type Item = String; fn next(&mut self) -> Option { self.content @@ -136,7 +136,7 @@ impl Token { /// An iterator over tokens found within the *.ascii format. #[derive(Clone, Debug)] struct Tokens<'a>(&'a str); -impl<'a> Iterator for Tokens<'a> { +impl Iterator for Tokens<'_> { type Item = Token; fn next(&mut self) -> Option { let (s, tok) = color_token(self.0) diff --git a/build.rs b/build.rs index 4bbe8804..55b28da5 100644 --- a/build.rs +++ b/build.rs @@ -44,9 +44,9 @@ fn strip_color_tokens_filter( tera::Value::String(s) => s, _ => return Err(tera::Error::msg("expected string")), }; - return Ok(tera::Value::String( + Ok(tera::Value::String( COLOR_INDEX_REGEX.replace_all(s, "").to_string(), - )); + )) } fn hex_to_rgb_filter(