From 292418c58853b47b2a5073ac8b51f0cb8e5b5515 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 23 Aug 2024 13:20:12 -0500 Subject: [PATCH] style: Make clippy happy --- crates/varcon-core/src/parser.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/varcon-core/src/parser.rs b/crates/varcon-core/src/parser.rs index 8fd23a5..9eda40e 100644 --- a/crates/varcon-core/src/parser.rs +++ b/crates/varcon-core/src/parser.rs @@ -1000,9 +1000,7 @@ impl Entry { .parse_next(input)?; entry.archaic = opt(preceded(space1, archaic)).parse_next(input)?.is_some(); entry.note = opt(preceded(space1, note)).parse_next(input)?; - entry.description = opt(preceded(space1, description)) - .parse_next(input)? - .map(|d| d.to_owned()); + entry.description = opt(preceded(space1, description)).parse_next(input)?; if opt((winnow::ascii::space0, '|')) .parse_next(input)? @@ -1019,7 +1017,7 @@ impl Entry { fn note(input: &mut &str) -> PResult { let (_, _, note) = (NOTE_PREFIX, space1, description).parse_next(input)?; - Ok(note.to_owned()) + Ok(note) } const NOTE_PREFIX: &str = "--";