Skip to content

Commit

Permalink
examples: use [T]::iter() rather than [T]::into_iter()
Browse files Browse the repository at this point in the history
Such calls will likely create by-value iterators in the future, and
raise warnings in 1.41.0+.

See issue rust-lang/rust#66145.
  • Loading branch information
unleashed committed Nov 25, 2019
1 parent 2cc352f commit dd45376
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 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
2 changes: 1 addition & 1 deletion examples/reqwest-report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,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 dd45376

Please sign in to comment.