Skip to content

Commit ff7b748

Browse files
committed
refactor
1 parent d6835f2 commit ff7b748

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

gix-refspec/src/match_group/util.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,5 +205,7 @@ fn is_complex_pattern(pattern: &BStr) -> bool {
205205
return true;
206206
}
207207
// Check for other glob features: ?, [, ], \
208-
pattern.iter().any(|&b| b == b'?' || b == b'[' || b == b']' || b == b'\\')
208+
pattern
209+
.iter()
210+
.any(|&b| b == b'?' || b == b'[' || b == b']' || b == b'\\')
209211
}

gix-refspec/tests/refspec/match_group.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ mod complex_globs {
214214
#[test]
215215
fn one_sided_simple_glob_patterns_match() {
216216
// Test that simple glob patterns (one asterisk) work correctly with matching
217-
let refs = vec![
217+
let refs = [
218218
new_ref("refs/heads/feature/foo", "1111111111111111111111111111111111111111"),
219219
new_ref("refs/heads/bugfix/bar", "2222222222222222222222222222222222222222"),
220220
new_ref("refs/tags/v1.0", "3333333333333333333333333333333333333333"),
@@ -277,7 +277,7 @@ mod complex_globs {
277277
#[test]
278278
fn one_sided_glob_with_suffix_matches() {
279279
// Test that glob patterns with suffix work correctly
280-
let refs = vec![
280+
let refs = [
281281
new_ref("refs/heads/feature", "1111111111111111111111111111111111111111"),
282282
new_ref("refs/heads/feat", "2222222222222222222222222222222222222222"),
283283
new_ref("refs/heads/main", "3333333333333333333333333333333333333333"),

0 commit comments

Comments
 (0)