Unified · Split
| @@ -181,11 +181,11 @@ dependencies = [ · 180 unmodified lines | ||
| 181 | 181 | "home", |
| 182 | 182 | "insta", |
| 183 | 183 | "log", |
| 184 | − "nom", | |
| 185 | 184 | "pulldown-cmark", |
| 186 | 185 | "semver", |
| 187 | 186 | "time", |
| 188 | 187 | "toml_edit", |
| 188 | + "winnow 0.3.6", | |
| 189 | 189 | ] |
| 190 | 190 | |
| 191 | 191 | [[package]] |
| @@ -636,7 +636,7 @@ checksum = "4b3db1aca6f1a2607dd99beed5d99df831ac73eae5994ff301dae712928e2dac" · 444 unmodified lines | ||
| 636 | 636 | dependencies = [ |
| 637 | 637 | "doc-comment", |
| 638 | 638 | "unicase", |
| 639 | − "winnow", | |
| 639 | + "winnow 0.5.0", | |
| 640 | 640 | ] |
| 641 | 641 | |
| 642 | 642 | [[package]] |
| @@ -2452,7 +2452,7 @@ dependencies = [ · 1809 unmodified lines | ||
| 2452 | 2452 | "serde", |
| 2453 | 2453 | "serde_spanned", |
| 2454 | 2454 | "toml_datetime", |
| 2455 | − "winnow", | |
| 2455 | + "winnow 0.5.0", | |
| 2456 | 2456 | ] |
| 2457 | 2457 | |
| 2458 | 2458 | [[package]] |
| @@ -2708,6 +2708,15 @@ version = "0.48.0" · 249 unmodified lines | ||
| 2708 | 2708 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 2709 | 2709 | checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" |
| 2710 | 2710 | |
| 2711 | +[[package]] | |
| 2712 | +name = "winnow" | |
| 2713 | +version = "0.3.6" | |
| 2714 | +source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 2715 | +checksum = "23d020b441f92996c80d94ae9166e8501e59c7bb56121189dc9eab3bd8216966" | |
| 2716 | +dependencies = [ | |
| 2717 | + "memchr", | |
| 2718 | +] | |
| 2719 | + | |
| 2711 | 2720 | [[package]] |
| 2712 | 2721 | name = "winnow" |
| 2713 | 2722 | version = "0.5.0" |
| @@ -34,7 +34,7 @@ toml_edit = "0.19.1" · 33 unmodified lines | ||
| 34 | 34 | semver = "1.0.4" |
| 35 | 35 | crates-index = { version = "1.0.0", git = "https://github.com/Byron/rust-crates-index", branch = "replace-git2-with-gitoxide" } |
| 36 | 36 | cargo_toml = "0.15.1" |
| 37 | −nom = { version = "7", default-features = false, features = ["std"]} | |
| 37 | +winnow = "0.3.0" | |
| 38 | 38 | git-conventional = "0.12.0" |
| 39 | 39 | time = "0.3.19" |
| 40 | 40 | pulldown-cmark = "0.9.0" |
| @@ -6,15 +6,15 @@ use std::{ · 5 unmodified lines | ||
| 6 | 6 | }; |
| 7 | 7 | |
| 8 | 8 | use gix::bstr::ByteSlice; |
| 9 | −use nom::{ | |
| 9 | +use pulldown_cmark::{CowStr, Event, HeadingLevel, OffsetIter, Tag}; | |
| 10 | +use winnow::{ | |
| 10 | 11 | branch::alt, |
| 11 | 12 | bytes::complete::{tag, tag_no_case, take_till, take_while, take_while_m_n}, |
| 12 | 13 | combinator::{all_consuming, map, map_res, opt}, |
| 13 | 14 | error::{FromExternalError, ParseError}, |
| 14 | 15 | sequence::{delimited, preceded, separated_pair, terminated, tuple}, |
| 15 | − Finish, IResult, | |
| 16 | + FinishIResult, IResult, | |
| 16 | 17 | }; |
| 17 | −use pulldown_cmark::{CowStr, Event, HeadingLevel, OffsetIter, Tag}; | |
| 18 | 18 | |
| 19 | 19 | use crate::{ |
| 20 | 20 | changelog, |
| @@ -467,7 +467,7 @@ impl<'a> TryFrom<&'a str> for Headline { · 446 unmodified lines | ||
| 467 | 467 | type Error = (); |
| 468 | 468 | |
| 469 | 469 | fn try_from(value: &'a str) -> Result<Self, Self::Error> { |
| 470 | − all_consuming(headline::<()>)(value).finish().map(|(_, h)| h) | |
| 470 | + all_consuming(headline::<()>)(value).finish_err().map(|(_, h)| h) | |
| 471 | 471 | } |
| 472 | 472 | } |
| 473 | 473 | |
| @@ -515,7 +515,7 @@ fn headline<'a, E: ParseError<&'a str> + FromExternalError<&'a str, ()>>(i: &'a · 41 unmodified lines | ||
| 515 | 515 | )), |
| 516 | 516 | greedy_whitespace, |
| 517 | 517 | ), |
| 518 | − |((hashes, (prefix, version)), date)| Headline { | |
| 518 | + |((hashes, (prefix, version)), date): ((&str, (_, _)), _)| Headline { | |
| 519 | 519 | level: hashes.len(), |
| 520 | 520 | version_prefix: prefix.map_or_else(String::new, ToOwned::to_owned), |
| 521 | 521 | version, |