style: Make clippy happy

This commit is contained in:
Ed Page 2024-08-23 13:20:12 -05:00
parent dd3e1018f8
commit 292418c588

View file

@ -1000,9 +1000,7 @@ impl Entry {
.parse_next(input)?; .parse_next(input)?;
entry.archaic = opt(preceded(space1, archaic)).parse_next(input)?.is_some(); entry.archaic = opt(preceded(space1, archaic)).parse_next(input)?.is_some();
entry.note = opt(preceded(space1, note)).parse_next(input)?; entry.note = opt(preceded(space1, note)).parse_next(input)?;
entry.description = opt(preceded(space1, description)) entry.description = opt(preceded(space1, description)).parse_next(input)?;
.parse_next(input)?
.map(|d| d.to_owned());
if opt((winnow::ascii::space0, '|')) if opt((winnow::ascii::space0, '|'))
.parse_next(input)? .parse_next(input)?
@ -1019,7 +1017,7 @@ impl Entry {
fn note(input: &mut &str) -> PResult<String, ()> { fn note(input: &mut &str) -> PResult<String, ()> {
let (_, _, note) = (NOTE_PREFIX, space1, description).parse_next(input)?; let (_, _, note) = (NOTE_PREFIX, space1, description).parse_next(input)?;
Ok(note.to_owned()) Ok(note)
} }
const NOTE_PREFIX: &str = "--"; const NOTE_PREFIX: &str = "--";