Skip to content

Commit 43cf773

Browse files
committed
Auto merge of #8476 - Rustin-Liu:rustin-patch, r=ehuss
fix: add space to comments
2 parents f35ebaf + 9ede526 commit 43cf773

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/cargo/ops/cargo_new.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,12 +524,12 @@ impl IgnoreList {
524524
_ => &self.ignore,
525525
};
526526

527-
let mut out = "\n\n#Added by cargo\n".to_string();
527+
let mut out = "\n\n# Added by cargo\n".to_string();
528528
if ignore_items
529529
.iter()
530530
.any(|item| existing_items.contains(item))
531531
{
532-
out.push_str("#\n#already existing elements were commented out\n");
532+
out.push_str("#\n# already existing elements were commented out\n");
533533
}
534534
out.push('\n');
535535

tests/testsuite/init.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ fn simple_git_ignore_exists() {
8282
contents,
8383
"/target\n\
8484
**/some.file\n\n\
85-
#Added by cargo\n\
85+
# Added by cargo\n\
8686
#\n\
87-
#already existing elements were commented out\n\
87+
# already existing elements were commented out\n\
8888
\n\
8989
#/target\n\
9090
Cargo.lock\n",
@@ -108,7 +108,7 @@ fn git_ignore_exists_no_conflicting_entries() {
108108
assert_eq!(
109109
contents,
110110
"**/some.file\n\n\
111-
#Added by cargo\n\
111+
# Added by cargo\n\
112112
\n\
113113
/target\n\
114114
Cargo.lock\n",

0 commit comments

Comments
 (0)