Lost trying to use winnow
⚓ Rust 📅 2025-12-14 👤 surdeus 👁️ 5Hello,
I'm trying to use winnow instead of manual parsing stuff... And gosh ! What a headache !
Ok so...
here is my initial naive code :
fn parse_range(input: &mut str) -> winnow::Result<Range> {
let (start, end) = separated_pair(
digit1.try_map(|d: &str| u16::from_str_radix(d, 10)),
literal("-"),
digit1.try_map(|d: &str| u16::from_str_radix(d, 10)),
)
.parse_next(input)?;
todo!()
}
bulid output (click for more details)
I've tried several things, but It's asking so many straits... I'm a bit lost...
1 post - 1 participant
🏷️ Rust_feed