Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Apply clippy fixes#1090

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
jayvdb wants to merge2 commits intoasync-rs:main
base:main
Choose a base branch
Loading
fromjayvdb:clippy-fixes
Open

Apply clippy fixes#1090

jayvdb wants to merge2 commits intoasync-rs:mainfromjayvdb:clippy-fixes

Conversation

jayvdb
Copy link
Contributor

@jayvdbjayvdb commentedSep 10, 2024
edited
Loading

Most of these are based on the automaticclippy --fix changes, with some many changes to reduce the noise.
max_value() toMAX and the cfg change are manual.

(note: I have since added the auto-fixes for these as well) After this PR there are two more clippy warnings, which I didnt apply because I am worried it may slightly change the API, thus introduce backwards incompatibility.

warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true    --> src/path/path.rs:1018:1     |1018 | impl<'a> Into<&'a std::path::Path> for &'a Path {     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^     |     = help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see             https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into     = note: `#[warn(clippy::from_over_into)]` on by defaulthelp: replace the `Into` implementation with `From<&'a path::path::Path>`     |1018 ~ impl<'a> From<&'a Path> for &'a std::path::Path {1019 ~     fn from(val: &'a Path) -> Self {1020 ~         std::path::Path::new(&val.inner)     |warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true   --> src/path/pathbuf.rs:367:1    |367 | impl Into<std::path::PathBuf> for PathBuf {    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^    |    = help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see            https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_intohelp: replace the `Into` implementation with `From<path::pathbuf::PathBuf>`    |367 ~ impl From<PathBuf> for std::path::PathBuf {368 ~     fn from(val: PathBuf) -> Self {369 ~         val.inner    |warning: `async-std` (lib) generated 2 warnings (run `cargo clippy --fix --lib -p async-std` to apply 2 suggestions)

Note I dont see any substantive overlap with#948 , so I guess that the clippy warnings from 2021 have all since been addressed and that PR can be closed.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@jayvdb

[8]ページ先頭

©2009-2025 Movatter.jp