mirror of
https://seed.radicle.dev/rad:z6cFWeWpnZNHh9rUW8phgA3b5yGt.git
synced 2026-10-24 05:40:38 +08:00
git-commit: remove useless check when converting trailers to string.
Signed-off-by: Han Xu <keepsimple@gmail.com>
This commit is contained in:
@@ -292,12 +292,8 @@ impl ToString for Commit {
|
||||
if !self.trailers.is_empty() {
|
||||
writeln!(buf).ok();
|
||||
}
|
||||
for (i, trailer) in self.trailers.iter().enumerate() {
|
||||
if i < self.trailers.len() {
|
||||
writeln!(buf, "{}", Trailer::from(trailer).display(": ")).ok();
|
||||
} else {
|
||||
write!(buf, "{}", Trailer::from(trailer).display(": ")).ok();
|
||||
}
|
||||
for trailer in self.trailers.iter() {
|
||||
writeln!(buf, "{}", Trailer::from(trailer).display(": ")).ok();
|
||||
}
|
||||
buf
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user