From e212eefc8907801f338932c4f6910c9445e1011d Mon Sep 17 00:00:00 2001 From: Steven Sheffey Date: Wed, 30 Oct 2019 11:17:37 -0500 Subject: [PATCH] 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. --- tests/daemon.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/daemon.rs b/tests/daemon.rs index 2476cc7..381de00 100644 --- a/tests/daemon.rs +++ b/tests/daemon.rs @@ -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. }