Skip to content

Commit

Permalink
Use slice::iter instead of into_iter to avoid future breakage
Browse files Browse the repository at this point in the history
`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.
  • Loading branch information
starfys committed Oct 30, 2019
1 parent 255b09a commit e212eef
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 e212eef

Please sign in to comment.