Closed EstebanBorai closed 4 years ago
Hey @erikjara any news on this PR?
@EstebanBorai Hi! Let me fix those warnings, create the coverage config and I'll merge your changes :)
$ cargo clippy -- -D warnings
Updating crates.io index
Checking rut-lib v0.1.2 (/home/travis/build/erikjara/rut-lib)
error: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent
--> src/lib.rs:299:22
|
299 | let dv = captures["dv"].to_uppercase().chars().nth(0).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `captures["dv"].to_uppercase().chars().next()`
|
= note: `-D clippy::iter-nth-zero` implied by `-D warnings`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero
error: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent
--> src/lib.rs:313:18
|
313 | _ => format!("{}", dv).chars().nth(0).unwrap(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `format!("{}", dv).chars().next()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero
error: aborting due to 2 previous errors
error: could not compile `rut-lib`.
Based on https://github.com/erikjara/rut-lib/projects/3#card-31422108 .
I've added a "first step" for CI/CD with GitHub Actions through a workflow that:
Further Steps to get this working
CRATES_IO_TOKEN
to supply a token forcargo login
Suggestions
I would also setup a CI workflow to format, lint and test your crate before releasing!
Hope this helps!