Skip to content

Conversation

@eshattow
Copy link

@eshattow eshattow commented Nov 5, 2025

Compare path object with path object to resolve Clippy warning.

Error details before the fix:

error: this creates an owned instance just for comparison
--> src/skeleton/mod.rs:334:52
|
334 | .find(|manifest| manifest.relative_path == std::path::PathBuf::from("Cargo.toml"));
| --------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| help: try: manifest.relative_path == "Cargo.toml"
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#cmp_owned
= note: -D clippy::cmp-owned implied by -D warnings
= help: to override -D warnings add #[allow(clippy::cmp_owned)]

Note: I have no idea about Rust language or if this correct, this does make the warning go away but I am not sure if this correctly compares the path content or if it is doing something unintended like comparing objects, please review.

Compare path object with path object to resolve Clippy warning.
@eshattow eshattow force-pushed the fixclippypathwarning branch from 27f7cdb to f28976f Compare November 12, 2025 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant