| @@ -284,7 +284,7 @@ mod parse { · 283 unmodified lines |
| 284 | ":_()", ":`()", ":~()", | 284 | ":_()", ":`()", ":~()", |
| 285 | ]; | 285 | ]; |
| 286 | | 286 | |
| 287 | inputs.into_iter().for_each(|input| { | 287 | for input in inputs.into_iter() { |
| 288 | assert!( | 288 | assert!( |
| 289 | !check_against_baseline(input), | 289 | !check_against_baseline(input), |
| 290 | "This pathspec is valid in git: {}", | 290 | "This pathspec is valid in git: {}", |
| @@ -294,7 +294,7 @@ mod parse { · 3 unmodified lines |
| 294 | let output = git_pathspec::parse(input.as_bytes()); | 294 | let output = git_pathspec::parse(input.as_bytes()); |
| 295 | assert!(output.is_err()); | 295 | assert!(output.is_err()); |
| 296 | assert!(matches!(output.unwrap_err(), Error::Unimplemented { .. })); | 296 | assert!(matches!(output.unwrap_err(), Error::Unimplemented { .. })); |
| 297 | }); | 297 | } |
| 298 | } | 298 | } |
| 299 | | 299 | |
| 300 | #[test] | 300 | #[test] |
| @@ -306,7 +306,7 @@ mod parse { · 5 unmodified lines |
| 306 | ":(top,exclude,icse)some/path", | 306 | ":(top,exclude,icse)some/path", |
| 307 | ]; | 307 | ]; |
| 308 | | 308 | |
| 309 | inputs.into_iter().for_each(|input| { | 309 | for input in inputs.into_iter() { |
| 310 | assert!( | 310 | assert!( |
| 311 | !check_against_baseline(input), | 311 | !check_against_baseline(input), |
| 312 | "This pathspec is valid in git: {}", | 312 | "This pathspec is valid in git: {}", |
| @@ -316,7 +316,7 @@ mod parse { · 3 unmodified lines |
| 316 | let output = git_pathspec::parse(input.as_bytes()); | 316 | let output = git_pathspec::parse(input.as_bytes()); |
| 317 | assert!(output.is_err()); | 317 | assert!(output.is_err()); |
| 318 | assert!(matches!(output.unwrap_err(), Error::InvalidKeyword { .. })); | 318 | assert!(matches!(output.unwrap_err(), Error::InvalidKeyword { .. })); |
| 319 | }); | 319 | } |
| 320 | } | 320 | } |
| 321 | | 321 | |
| 322 | #[test] | 322 | #[test] |
| @@ -454,7 +454,7 @@ mod parse { · 131 unmodified lines |
| 454 | } | 454 | } |
| 455 | | 455 | |
| 456 | fn check_valid_inputs<'a>(inputs: impl IntoIterator<Item = (&'a str, PatternForTesting)>) { | 456 | fn check_valid_inputs<'a>(inputs: impl IntoIterator<Item = (&'a str, PatternForTesting)>) { |
| 457 | inputs.into_iter().for_each(|(input, expected)| { | 457 | for (input, expected) in inputs.into_iter() { |
| 458 | assert!( | 458 | assert!( |
| 459 | check_against_baseline(input), | 459 | check_against_baseline(input), |
| 460 | "This pathspec is invalid in git: {}", | 460 | "This pathspec is invalid in git: {}", |
| @@ -465,7 +465,7 @@ mod parse { · 4 unmodified lines |
| 465 | .unwrap_or_else(|_| panic!("parsing should not fail with pathspec {}", input)) | 465 | .unwrap_or_else(|_| panic!("parsing should not fail with pathspec {}", input)) |
| 466 | .into(); | 466 | .into(); |
| 467 | assert_eq!(pattern, expected, "while checking input: \"{}\"", input); | 467 | assert_eq!(pattern, expected, "while checking input: \"{}\"", input); |
| 468 | }); | 468 | } |
| 469 | } | 469 | } |
| 470 | | 470 | |
| 471 | fn pat_with_path(path: &str) -> PatternForTesting { | 471 | fn pat_with_path(path: &str) -> PatternForTesting { |