sfackler / rust-native-tls

Apache License 2.0
470 stars 195 forks source link

native-tls 0.2.10 MSRV raised to 1.53.0 #222

Open NinoScript opened 2 years ago

NinoScript commented 2 years ago

This change added for byte in bytes { which fails with in Rust < 1.53.

Error message ``` error[E0277]: `[u8; 10]` is not an iterator --> /edited-out/.cargo/registry/src/github.com-1ecc6299db9ec823/native-tls-0.2.10/src/imp/security_framework.rs:197:17 | 197 | for byte in bytes { | ^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it | = help: the trait `Iterator` is not implemented for `[u8; 10]` = note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]` = note: required because of the requirements on the impl of `IntoIterator` for `[u8; 10]` = note: required by `into_iter` ```

Borrowing the array (for byte in &bytes {) would allow this crate to keep working in older Rust versions. IMO, it's ok if you decide not to work with older Rust versions, but I did want to let you know.

sfackler commented 2 years ago

Sure, happy to take a PR changing that and ratcheting the MSRV back down.

NinoScript commented 2 years ago

There you go 😄