Skip to content

Commit

Permalink
Merge #60
Browse files Browse the repository at this point in the history
60: examples: use [T]::iter() rather than [T]::into_iter() r=davidor a=unleashed

Such calls will likely create by-value iterators in the future, and
raise warnings in 1.41.0+.

See issue rust-lang/rust#66145.

Co-authored-by: Alejandro Martinez Ruiz <[email protected]>
  • Loading branch information
bors[bot] and unleashed authored Nov 25, 2019
2 parents 2cc352f + 7f7cf44 commit 8381d55
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 8381d55

Please sign in to comment.