Skip to content

Commit

Permalink
Merge #84
Browse files Browse the repository at this point in the history
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 <stevensheffey4@gmail.com>
  • Loading branch information
bors[bot] and starfys authored Dec 23, 2019
2 parents 2873d1d + e212eef commit 275d1d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/daemon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fn test_notify() {
let result = daemon::notify(false, [
(daemon::STATE_READY, "1"),
(daemon::STATE_STATUS, "Running test_notify()"),
].into_iter());
].iter());
assert!(result.is_ok());
assert_eq!(result.ok().unwrap(), false); // should fail, since this is not systemd-launched.
}

0 comments on commit 275d1d1

Please sign in to comment.