Skip to content

Commit bce3083

Browse files
committed
refactor: remove unnecessary return keyword
1 parent c9fa7db commit bce3083

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/cargo/ops/cargo_new.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -422,8 +422,8 @@ struct IgnoreList {
422422
impl IgnoreList {
423423
/// constructor to build a new ignore file
424424
fn new() -> IgnoreList {
425-
return IgnoreList{
426-
ignore: Vec::new(),
425+
IgnoreList {
426+
ignore: Vec::new(),
427427
hg_ignore: Vec::new(),
428428
}
429429
}
@@ -440,9 +440,9 @@ impl IgnoreList {
440440
/// version control system as `String`.
441441
fn format_new(&self, vcs: VersionControl) -> String {
442442
match vcs {
443-
VersionControl::Hg => return self.hg_ignore.join("\n"),
444-
_ => return self.ignore.join("\n"),
445-
};
443+
VersionControl::Hg => self.hg_ignore.join("\n"),
444+
_ => self.ignore.join("\n"),
445+
}
446446
}
447447

448448
/// format_existing is used to format the IgnoreList when the ignore file
@@ -501,7 +501,7 @@ fn write_ignore_file(base_path: &Path, list: &IgnoreList, vcs: VersionControl) -
501501

502502
paths::append(&fp_ignore, ignore.as_bytes())?;
503503

504-
return Ok(ignore)
504+
Ok(ignore)
505505
}
506506

507507
/// initialize the correct vcs system based on the provided config

0 commit comments

Comments
 (0)