Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed rerun-if-changed to full xml path of message definitions #232

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mavlink-bindgen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
) -> Result<GeneratedBindings, BindGenError> {
let mut bindings = vec![];

for entry_maybe in read_dir(&definitions_dir).map_err(|source| {

Check warning on line 39 in mavlink-bindgen/src/lib.rs

View workflow job for this annotation

GitHub Actions / linting

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits --> mavlink-bindgen/src/lib.rs:39:33 | 39 | for entry_maybe in read_dir(&definitions_dir).map_err(|source| { | ^^^^^^^^^^^^^^^^ help: change this to: `definitions_dir` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
BindGenError::CouldNotReadDefinitionsDirectory {
source,
path: definitions_dir.to_path_buf(),
Expand Down Expand Up @@ -64,11 +64,11 @@
})?);

// generate code
parser::generate(&definitions_dir, &definition_file, &mut outf);

Check warning on line 67 in mavlink-bindgen/src/lib.rs

View workflow job for this annotation

GitHub Actions / linting

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler --> mavlink-bindgen/src/lib.rs:67:26 | 67 | parser::generate(&definitions_dir, &definition_file, &mut outf); | ^^^^^^^^^^^^^^^^ help: change this to: `definitions_dir` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default

bindings.push(GeneratedBinding {
module_name,
mavlink_xml: definition_file,
mavlink_xml: entry.path(),
rust_module: dest_path,
});
}
Expand Down Expand Up @@ -119,7 +119,7 @@
// Re-run build if definition file changes
println!(
"cargo:rerun-if-changed={}",
binding.rust_module.to_string_lossy()
binding.mavlink_xml.to_string_lossy()
);
}
}
Loading