Skip to content

Commit

Permalink
examples/curl-easy{,2}-report: use [T].iter() rather than into_iter()
Browse files Browse the repository at this point in the history
Such calls will likely create by-value iterators in the future.

See issue rust-lang/rust#66145.
  • Loading branch information
unleashed committed Nov 25, 2019
1 parent 2cc352f commit 6c54a6e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/curl-easy-report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fn main() -> Result<(), threescalers::errors::Error> {
let creds = Credentials::ServiceToken(ServiceToken::from("12[3]token"));
let svc = Service::new("svc123", creds);
let uks = ["userkey_1", "userkey_2", "userkey_3", "userkey 4", "userkey 5"];
let apps = uks.into_iter()
let apps = uks.iter()
.map(|uk| Application::from(UserKey::from(*uk)))
.collect::<Vec<_>>();

Expand Down
2 changes: 1 addition & 1 deletion examples/curl-easy2-report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fn main() -> Result<(), threescalers::errors::Error> {
let creds = Credentials::ServiceToken(ServiceToken::from("12[3]token"));
let svc = Service::new("svc123", creds);
let uks = ["userkey_1", "userkey_2", "userkey_3", "userkey 4", "userkey 5"];
let apps = uks.into_iter()
let apps = uks.iter()
.map(|uk| Application::from(UserKey::from(*uk)))
.collect::<Vec<_>>();

Expand Down

0 comments on commit 6c54a6e

Please sign in to comment.