Skip to content

Commit fe37d14

Browse files
authored
refactor(clippy): apply semicolon_if_nothing_returned clippy lint (#851)
1 parent 9ef62e8 commit fe37d14

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

git-cliff-core/src/changelog.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ impl<'a> Changelog<'a> {
172172
let skip_tag = r.is_match(version);
173173
if skip_tag {
174174
skipped_tags.push(version.clone());
175-
trace!("Skipping release: {}", version)
175+
trace!("Skipping release: {}", version);
176176
}
177177
skip_tag
178178
})
@@ -1082,7 +1082,7 @@ mod test {
10821082

10831083
if let Some(parsers) = config.git.commit_parsers.as_mut() {
10841084
for parser in parsers.iter_mut().filter(|p| p.footer.is_some()) {
1085-
parser.skip = Some(true)
1085+
parser.skip = Some(true);
10861086
}
10871087
}
10881088

git-cliff-core/src/commit.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,15 +275,15 @@ impl Commit<'_> {
275275
for parser in parsers {
276276
let mut regex_checks = Vec::new();
277277
if let Some(message_regex) = parser.message.as_ref() {
278-
regex_checks.push((message_regex, self.message.to_string()))
278+
regex_checks.push((message_regex, self.message.to_string()));
279279
}
280280
let body = self
281281
.conv
282282
.as_ref()
283283
.and_then(|v| v.body())
284284
.map(|v| v.to_string());
285285
if let Some(body_regex) = parser.body.as_ref() {
286-
regex_checks.push((body_regex, body.clone().unwrap_or_default()))
286+
regex_checks.push((body_regex, body.clone().unwrap_or_default()));
287287
}
288288
if let (Some(footer_regex), Some(footers)) = (
289289
parser.footer.as_ref(),
@@ -489,7 +489,7 @@ mod test {
489489
),
490490
];
491491
for (commit, is_conventional) in &test_cases {
492-
assert_eq!(is_conventional, &commit.clone().into_conventional().is_ok())
492+
assert_eq!(is_conventional, &commit.clone().into_conventional().is_ok());
493493
}
494494
let commit = test_cases[0].0.clone().parse(
495495
&[CommitParser {
@@ -585,7 +585,7 @@ mod test {
585585
),
586586
];
587587
for (commit, is_conventional) in &test_cases {
588-
assert_eq!(is_conventional, &commit.clone().into_conventional().is_ok())
588+
assert_eq!(is_conventional, &commit.clone().into_conventional().is_ok());
589589
}
590590
let commit = Commit::new(
591591
String::from("123123"),

git-cliff-core/src/remote/gitlab.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,6 @@ mod test {
301301
assert_eq!(
302302
"https://gitlab.test.com/api/v4/projects/abc%2Fdef%2Fxyz1",
303303
GitLabProject::url(1, "https://gitlab.test.com/api/v4", &remote, 0)
304-
)
304+
);
305305
}
306306
}

git-cliff-core/src/template.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ impl Template {
3636
.lines()
3737
.map(|v| v.trim())
3838
.collect::<Vec<&str>>()
39-
.join("\n")
39+
.join("\n");
4040
}
4141
let mut tera = Tera::default();
4242
if let Err(e) = tera.add_raw_template("template", &template) {

git-cliff/src/args.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ mod tests {
449449

450450
#[test]
451451
fn verify_cli() {
452-
Opt::command().debug_assert()
452+
Opt::command().debug_assert();
453453
}
454454

455455
#[test]

git-cliff/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ fn process_repository<'a>(
103103
let count = count_tags.map_or(true, |r| {
104104
let count_tag = r.is_match(name);
105105
if count_tag {
106-
trace!("Counting release: {}", name)
106+
trace!("Counting release: {}", name);
107107
}
108108
count_tag
109109
});
@@ -115,7 +115,7 @@ fn process_repository<'a>(
115115

116116
let ignore_tag = r.is_match(name);
117117
if ignore_tag {
118-
trace!("Ignoring release: {}", name)
118+
trace!("Ignoring release: {}", name);
119119
}
120120
ignore_tag
121121
});
@@ -239,7 +239,7 @@ fn process_repository<'a>(
239239
if let Some(commit_id) = commits.first().map(|c| c.id().to_string()) {
240240
match tags.get(&commit_id) {
241241
Some(tag) => {
242-
warn!("There is already a tag ({:?}) for {}", tag, commit_id)
242+
warn!("There is already a tag ({:?}) for {}", tag, commit_id);
243243
}
244244
None => {
245245
tags.insert(commit_id, repository.resolve_tag(tag));
@@ -535,7 +535,7 @@ pub fn run(mut args: Opt) -> Result<()> {
535535

536536
// Process commits and releases for the changelog.
537537
if let Some(BumpOption::Specific(bump_type)) = args.bump {
538-
config.bump.bump_type = Some(bump_type)
538+
config.bump.bump_type = Some(bump_type);
539539
}
540540

541541
// Generate changelog from context.
@@ -575,7 +575,7 @@ pub fn run(mut args: Opt) -> Result<()> {
575575
sha: Some(sha1.to_string()),
576576
skip: Some(true),
577577
..Default::default()
578-
})
578+
});
579579
}
580580
}
581581

0 commit comments

Comments
 (0)