Clippy errors in CI with Rust 1.72
Closed this issue · 0 comments
edmorley commented
CI is currently failing with new Clippy errors as of the Rust 1.72 release:
error: useless use of `vec!`
--> src/vrs.rs:131:36
|
131 | let mut composed_version = vec![
| ____________________________________^
132 | | caps.get(1).map_or("0", |major| major.as_str()),
133 | | caps.get(2).map_or("0", |minor| minor.as_str()),
134 | | caps.get(3).map_or("0", |patch| patch.as_str()),
135 | | ]
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
= note: `-D clippy::useless-vec` implied by `-D warnings`
help: you can use an array directly
|
131 ~ let mut composed_version = [caps.get(1).map_or("0", |major| major.as_str()),
132 + caps.get(2).map_or("0", |minor| minor.as_str()),
133 + caps.get(3).map_or("0", |patch| patch.as_str())]
|
eg:
https://github.com/heroku/buildpacks-go/actions/runs/5965521142/job/16183138665#step:5:201
cc @joshwlewis