Skip to content

Commit d652c9b

Browse files
committed
clippy fixes
1 parent a503057 commit d652c9b

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

prebindgen-project-root/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fn main() {
1414
let manifest_dir =
1515
PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set"));
1616

17-
if manifest_dir.starts_with(&cargo_home) {
17+
if manifest_dir.starts_with(cargo_home) {
1818
println!("cargo:rustc-env=PROJECT_ROOT=");
1919
println!("cargo:warning=prebindgen-project-root is not located inside your workspace");
2020
} else {

prebindgen-project-root/tests/install_standalone.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ fn copy_fixture(tmp_root: &Path, fixture: &str) -> PathBuf {
5858

5959
fn run_install(manifest: &Path) {
6060
let bin = cargo_bin("cargo-prebindgen-project-root");
61-
Command::new(&bin)
61+
Command::new(bin)
6262
.arg("install")
6363
.arg(manifest)
6464
.assert()

prebindgen/src/api/source.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ impl Source {
255255
/// let items: Vec<_> = source.items_all().collect();
256256
/// assert_eq!(items.len(), 2); // should contain TestStruct and test_function
257257
/// ```
258-
pub fn items_all<'a>(&'a self) -> impl Iterator<Item = (syn::Item, SourceLocation)> + 'a {
258+
pub fn items_all(&self) -> impl Iterator<Item = (syn::Item, SourceLocation)> + '_ {
259259
// Build a cfg filter and apply it lazily with itertools::batching
260260
let mut filter = self.build_cfg_filter();
261261
self.items
@@ -363,15 +363,15 @@ impl Source {
363363
/// Read the crate name from the stored file
364364
fn read_stored_crate_name(input_dir: &Path) -> Option<String> {
365365
let crate_name_path = input_dir.join(CRATE_NAME_FILE);
366-
fs::read_to_string(&crate_name_path)
366+
fs::read_to_string(crate_name_path)
367367
.ok()
368368
.map(|s| s.trim().to_string())
369369
}
370370

371371
/// Read enabled features list from FEATURES_FILE and normalize into a sorted, deduplicated Vec<String>
372372
fn read_features_from_out_dir(input_dir: &Path) -> Vec<String> {
373373
let features_path = input_dir.join(FEATURES_FILE);
374-
let Some(contents) = fs::read_to_string(&features_path).ok() else {
374+
let Some(contents) = fs::read_to_string(features_path).ok() else {
375375
return Vec::new();
376376
};
377377
let mut features: Vec<String> = contents

0 commit comments

Comments
 (0)