Skip to content

Commit

Permalink
Fixed the needless_lifetimes clippy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ZapAnton committed Oct 31, 2019
1 parent ddb100c commit 95b5b75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ascii_art.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ fn add_colored_segment(base: &mut String, segment: &str, color: Color, bold: boo

type ParseResult<'a, R> = Option<(&'a str, R)>;

fn token<'a, R>(s: &'a str, predicate: impl FnOnce(char) -> Option<R>) -> ParseResult<'a, R> {
fn token<R>(s: &str, predicate: impl FnOnce(char) -> Option<R>) -> ParseResult<R> {
let token = s.chars().next()?;
let result = predicate(token)?;
Some((s.get(1..).unwrap(), result))
Expand Down

0 comments on commit 95b5b75

Please sign in to comment.