Skip to content

Commit

Permalink
Explicit iter [&str] for 1.38.0 test
Browse files Browse the repository at this point in the history
Explicity `iter()` over `[&str]` for `cargo test` under version
1.38.0. Otherwise fails with "IntoIterator not implemented".
  • Loading branch information
jtmoon79 committed Mar 14, 2023
1 parent 5bd1278 commit 6885da1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/datetime/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ fn test_parse_datetime_utc() {
"2001-02-03T04:05:06-01 : :00", // invalid timezone spacing
" +82701 - 05 - 6 T 15 : 9 : 60.898989898989 Z", // valid datetime, wrong format
];
for &s in &invalid {
for &s in invalid.iter() {
eprintln!("test_parse_datetime_utc invalid {:?}", s);
assert!(s.parse::<DateTime<Utc>>().is_err());
}
Expand Down
2 changes: 1 addition & 1 deletion src/naive/datetime/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ fn test_datetime_from_str() {
"+802701-123-12T12:12:12", // out-of-bound year, invalid month
" +82701 - 05 - 6 T 15 : 9 : 60.898989898989 ", // many spaces
];
for &s in &invalid {
for &s in invalid.iter() {
eprintln!("test_datetime_from_str invalid {:?}", s);
assert!(s.parse::<NaiveDateTime>().is_err());
}
Expand Down

0 comments on commit 6885da1

Please sign in to comment.