mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Auto merge of #8476 - Rustin-Liu:rustin-patch, r=ehuss
fix: add space to comments
This commit is contained in:
commit
43cf77395c
@ -524,12 +524,12 @@ impl IgnoreList {
|
||||
_ => &self.ignore,
|
||||
};
|
||||
|
||||
let mut out = "\n\n#Added by cargo\n".to_string();
|
||||
let mut out = "\n\n# Added by cargo\n".to_string();
|
||||
if ignore_items
|
||||
.iter()
|
||||
.any(|item| existing_items.contains(item))
|
||||
{
|
||||
out.push_str("#\n#already existing elements were commented out\n");
|
||||
out.push_str("#\n# already existing elements were commented out\n");
|
||||
}
|
||||
out.push('\n');
|
||||
|
||||
|
@ -82,9 +82,9 @@ fn simple_git_ignore_exists() {
|
||||
contents,
|
||||
"/target\n\
|
||||
**/some.file\n\n\
|
||||
#Added by cargo\n\
|
||||
# Added by cargo\n\
|
||||
#\n\
|
||||
#already existing elements were commented out\n\
|
||||
# already existing elements were commented out\n\
|
||||
\n\
|
||||
#/target\n\
|
||||
Cargo.lock\n",
|
||||
@ -108,7 +108,7 @@ fn git_ignore_exists_no_conflicting_entries() {
|
||||
assert_eq!(
|
||||
contents,
|
||||
"**/some.file\n\n\
|
||||
#Added by cargo\n\
|
||||
# Added by cargo\n\
|
||||
\n\
|
||||
/target\n\
|
||||
Cargo.lock\n",
|
||||
|
Loading…
x
Reference in New Issue
Block a user