Skip to content

Commit

Permalink
chore: fix clippy lint (#931)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoIeni committed Aug 26, 2023
1 parent bfba216 commit 88894d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[workspace]
resolver = "2"
members = ["crates/*"]

[workspace.dependencies]
Expand Down
4 changes: 2 additions & 2 deletions crates/release_plz_core/src/changelog_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ use regex::Regex;
/// (in the ..anything.. case, `## ..anything..` is not included in the header)
pub fn parse_header(changelog: &str) -> Option<String> {
lazy_static::lazy_static! {
static ref FIRST_RE: Regex = Regex::new(r#"(?s)^(# Changelog|# CHANGELOG|# changelog)(.*)(## Unreleased|## \[Unreleased\])"#).unwrap();
static ref FIRST_RE: Regex = Regex::new(r"(?s)^(# Changelog|# CHANGELOG|# changelog)(.*)(## Unreleased|## \[Unreleased\])").unwrap();

static ref SECOND_RE: Regex = Regex::new(r#"(?s)^(# Changelog|# CHANGELOG|# changelog)(.*)(\n## )"#).unwrap();
static ref SECOND_RE: Regex = Regex::new(r"(?s)^(# Changelog|# CHANGELOG|# changelog)(.*)(\n## )").unwrap();
}
if let Some(captures) = FIRST_RE.captures(changelog) {
return Some(format!("{}\n", &captures[0]));
Expand Down

0 comments on commit 88894d4

Please sign in to comment.