Skip to content

Commit 66a5ae1

Browse files
committed
Drop trailing , just before ) on same line in function calls
These appear unintentional, and in most cases may have been introduced before rustfmt collapsed the lines, or with the idea that they would cause rustfmt to expand the lines but where that did not occur, or in an earlier version of the code where the last argument was longer and thus split onto another line. This does not remove a trailing `,` after the same argument when the argument is on its own line. Although this does remove trailing `,` in some macro calls (e.g., `format!`), this of course avoids making such changes in macro definitions, where `,)` is semantic.
1 parent d1b357e commit 66a5ae1

File tree

37 files changed

+63
-63
lines changed

37 files changed

+63
-63
lines changed

gix-attributes/tests/parse/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ fn exclamation_marks_must_be_escaped_or_error_unlike_gitignore() {
117117

118118
#[test]
119119
fn invalid_escapes_in_quotes_are_an_error() {
120-
assert!(matches!(try_line(r#""\!hello""#), Err(parse::Error::Unquote(_)),),);
120+
assert!(matches!(try_line(r#""\!hello""#), Err(parse::Error::Unquote(_))));
121121
assert!(lenient_lines(r#""\!hello""#).is_empty());
122122
}
123123

gix-config/tests/config/file/access/read_only.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ fn get_value_for_all_provided_values() -> crate::Result {
8787
&[cow_str("")],
8888
"unset values show up as empty within a string array"
8989
);
90-
assert_eq!(config.strings("core.bool-implicit").expect("present"), &[cow_str("")],);
90+
assert_eq!(config.strings("core.bool-implicit").expect("present"), &[cow_str("")]);
9191

9292
assert_eq!(config.string("doesn't.exist"), None);
9393

gix-config/tests/config/file/init/comfort.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ fn from_git_dir() -> crate::Result {
4444
"value",
4545
"a value from the local repo configuration"
4646
);
47-
assert_eq!(config.string("a.local").expect("present").as_ref(), "value",);
47+
assert_eq!(config.string("a.local").expect("present").as_ref(), "value");
4848
assert_eq!(
4949
config.string_by("a", None, "local-include").expect("present").as_ref(),
5050
"from-a.config",

gix-config/tests/config/key/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ fn valid_and_invalid() {
2121
assert_eq!(key.value_name, "baz");
2222

2323
let key = r"includeIf.gitdir/i:C:\bare.git.path".as_key();
24-
assert_eq!(key.subsection_name, Some(r"gitdir/i:C:\bare.git".into()),);
24+
assert_eq!(key.subsection_name, Some(r"gitdir/i:C:\bare.git".into()));
2525
}
2626

2727
mod _ref {

gix-config/tests/config/source/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ fn git_config_no_system() {
4343
_ => unreachable!("known set"),
4444
}
4545
})
46-
.is_some(),);
46+
.is_some());
4747
}
4848

4949
#[test]

gix-config/tests/config/value/normalize.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ fn quotes_right_next_to_each_other() {
4949
#[test]
5050
fn escaped_quotes_are_kept() {
5151
let cow = normalize_bstr(r#""hello \"\" world""#);
52-
assert_eq!(cow, cow_str("hello \"\" world").clone(),);
52+
assert_eq!(cow, cow_str("hello \"\" world").clone());
5353
assert!(matches!(cow, Cow::Owned(_)));
5454
}
5555

gix-diff/tests/diff/index.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ fn renames_by_similarity_with_limit() -> crate::Result {
312312
"fuzzy tracking is effectively disabled due to limit"
313313
);
314314
let actual: Vec<_> = changes.iter().map(|c| c.fields().0).collect();
315-
assert_eq!(actual, ["f1", "f1-renamed", "f2", "f2-renamed"],);
315+
assert_eq!(actual, ["f1", "f1-renamed", "f2", "f2-renamed"]);
316316

317317
let out = out.expect("tracking enabled");
318318
assert_eq!(out.num_similarity_checks, 0);

gix-diff/tests/diff/tree_with_rewrites.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ fn renames_by_similarity_with_limit() -> crate::Result {
422422
"fuzzy tracking is effectively disabled due to limit"
423423
);
424424
let actual: Vec<_> = changes.iter().map(Change::location).collect();
425-
assert_eq!(actual, ["f1", "f1-renamed", "f2", "f2-renamed"],);
425+
assert_eq!(actual, ["f1", "f1-renamed", "f2", "f2-renamed"]);
426426

427427
let out = out.expect("tracking enabled");
428428
assert_eq!(out.num_similarity_checks, 0);

gix-dir/tests/dir/walk.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2166,8 +2166,8 @@ fn untracked_and_ignored_collapse_handling_for_deletion_with_wildcards() -> crat
21662166
entryps("c.o", Ignored(Expendable), File, WildcardMatch),
21672167
entryps("d/a.o", Ignored(Expendable), File, WildcardMatch),
21682168
entryps("d/b.o", Ignored(Expendable), File, WildcardMatch),
2169-
entryps("d/d/a.o", Ignored(Expendable), File, WildcardMatch,),
2170-
entryps("d/d/b.o", Ignored(Expendable), File, WildcardMatch,),
2169+
entryps("d/d/a.o", Ignored(Expendable), File, WildcardMatch),
2170+
entryps("d/d/b.o", Ignored(Expendable), File, WildcardMatch),
21712171
entryps("generated/a.o", Ignored(Expendable), File, WildcardMatch),
21722172
entryps("objs", Ignored(Expendable), Directory, WildcardMatch),
21732173
],
@@ -2213,7 +2213,7 @@ fn untracked_and_ignored_collapse_handling_for_deletion_with_wildcards() -> crat
22132213
entryps("c.o", Ignored(Expendable), File, WildcardMatch),
22142214
entryps("d/a.o", Ignored(Expendable), File, WildcardMatch),
22152215
entryps("d/b.o", Ignored(Expendable), File, WildcardMatch),
2216-
entryps("d/d", Untracked, Directory, WildcardMatch,),
2216+
entryps("d/d", Untracked, Directory, WildcardMatch),
22172217
entryps_dirstat("d/d/a.o", Ignored(Expendable), File, WildcardMatch, Untracked),
22182218
entryps_dirstat("d/d/b.o", Ignored(Expendable), File, WildcardMatch, Untracked),
22192219
entryps_dirstat(

gix-discover/tests/discover/upwards/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ fn from_working_dir_no_config() -> crate::Result {
9898
for name in ["worktree-no-config-after-init", "worktree-no-config"] {
9999
let dir = repo_path()?.join(name);
100100
let (path, trust) = gix_discover::upwards(&dir)?;
101-
assert_eq!(path.kind(), Kind::WorkTree { linked_git_dir: None },);
101+
assert_eq!(path.kind(), Kind::WorkTree { linked_git_dir: None });
102102
assert_eq!(path.as_ref(), dir, "a working tree dir yields the git dir");
103103
assert_eq!(trust, expected_trust());
104104
}

0 commit comments

Comments
 (0)