mirror of
https://github.com/orhun/git-cliff.git
synced 2024-11-25 13:22:17 +03:00
refactor(clippy): apply if_not_else lint (#882)
This commit is contained in:
parent
a344c68238
commit
8b7c20083a
@ -131,10 +131,10 @@ impl<'a> Changelog<'a> {
|
||||
.filter_map(|line| {
|
||||
let mut c = commit.clone();
|
||||
c.message = line.to_string();
|
||||
if !c.message.is_empty() {
|
||||
Self::process_commit(&c, &self.config.git)
|
||||
} else {
|
||||
if c.message.is_empty() {
|
||||
None
|
||||
} else {
|
||||
Self::process_commit(&c, &self.config.git)
|
||||
}
|
||||
})
|
||||
.collect()
|
||||
|
@ -355,12 +355,12 @@ impl Commit<'_> {
|
||||
}
|
||||
}
|
||||
}
|
||||
if !filter {
|
||||
Ok(self)
|
||||
} else {
|
||||
if filter {
|
||||
Err(AppError::GroupError(String::from(
|
||||
"Commit does not belong to any group",
|
||||
)))
|
||||
} else {
|
||||
Ok(self)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -249,10 +249,10 @@ impl Repository {
|
||||
return 0;
|
||||
}
|
||||
let name = entry.name().expect("failed to get entry name");
|
||||
let entry_path = if dir != "," {
|
||||
format!("{dir}/{name}")
|
||||
} else {
|
||||
let entry_path = if dir == "," {
|
||||
name.to_string()
|
||||
} else {
|
||||
format!("{dir}/{name}")
|
||||
};
|
||||
changed_files.push(entry_path.into());
|
||||
0
|
||||
|
Loading…
Reference in New Issue
Block a user