Skip to content

Commit 275d1d1

Browse files
bors[bot]starfys
andauthored
Merge #84
84: Use `slice::iter` instead of `into_iter` to avoid future breakage r=jmesmon a=starfys Use `slice::iter` instead of `into_iter` to avoid future breakage `an_array.into_iter()` currently just works because of the autoref feature, which then calls `<[T] as IntoIterator>::into_iter`. But in the future, arrays will implement `IntoIterator`, too. In order to avoid problems in the future, the call is replaced by `iter()` which is shorter and more explicit. A crater run showed that your crate is affected by a potential future change. See rust-lang/rust#65819 for more information. Co-authored-by: Steven Sheffey <[email protected]>
2 parents 2873d1d + e212eef commit 275d1d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/daemon.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fn test_notify() {
2525
let result = daemon::notify(false, [
2626
(daemon::STATE_READY, "1"),
2727
(daemon::STATE_STATUS, "Running test_notify()"),
28-
].into_iter());
28+
].iter());
2929
assert!(result.is_ok());
3030
assert_eq!(result.ok().unwrap(), false); // should fail, since this is not systemd-launched.
3131
}

0 commit comments

Comments
 (0)