Skip to content

Conversation

@yingmanwumen
Copy link
Contributor

Use cargo clippy to improve the code quality of rust (#184)

Main changes:

  1. &Vec<T> to &[T](https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg)
  2. ... .map(|x| x.clone()) ... to ... .cloned() ... (https://rust-lang.github.io/rust-clippy/master/index.html#map_clone)
  3. Something else

- name: Install Python packages
run: |
pip install -r ./requirements/dev.txt
- name: Cargo clippy
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use Rust Lints here.

Copy link
Collaborator

@tushushu tushushu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All look good to me, just a tiny problem which I'm fixing it myself.

@tushushu tushushu added the code quality To improve or check code quality. label Jun 5, 2022
@tushushu tushushu added this to the ulist 0.11.0 milestone Jun 5, 2022
@tushushu tushushu linked an issue Jun 5, 2022 that may be closed by this pull request
@tushushu tushushu merged commit 987d3a1 into Rust-Data-Science:main Jun 5, 2022
@tushushu
Copy link
Collaborator

tushushu commented Jun 5, 2022

I am using cargo clippy -- -D warnings instead, and this will make the task fail if there is any warning. @yingmanwumen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code quality To improve or check code quality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Check Rust via clippy in CI to improve Rust code

2 participants