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

Silence clippy::needless_update for fully specified MroUsing. #497

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
1 change: 1 addition & 0 deletions martian-derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
};
let using_attributes_fn = quote![
fn using_attributes() -> ::martian::MroUsing {
#[allow(clippy::needless_update)]
::martian::MroUsing {
#mem_gb_quote
#threads_quote
Expand Down Expand Up @@ -324,10 +325,10 @@

Err(Error::new(
span,
format!(
"{}. You are trying to use it on {} trait implementation.",
ATTR_NOT_ON_TRAIT_IMPL_ERROR, last_ident
),

Check warning on line 331 in martian-derive/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy_check

variables can be used directly in the `format!` string

warning: variables can be used directly in the `format!` string --> martian-derive/src/lib.rs:328:9 | 328 | / format!( 329 | | "{}. You are trying to use it on {} trait implementation.", 330 | | ATTR_NOT_ON_TRAIT_IMPL_ERROR, last_ident 331 | | ), | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args = note: requested on the command line with `-W clippy::uninlined-format-args`
))
}

Expand Down Expand Up @@ -551,10 +552,10 @@
if blacklist.contains(name.as_str()) {
return syn::Error::new(
field.ident.unwrap().span(),
format!(
"Field name {} is not allowed here since it is a martian keyword",
name
),

Check warning on line 558 in martian-derive/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy_check

variables can be used directly in the `format!` string

warning: variables can be used directly in the `format!` string --> martian-derive/src/lib.rs:555:17 | 555 | / format!( 556 | | "Field name {} is not allowed here since it is a martian keyword", 557 | | name 558 | | ), | |_________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
)
.to_compile_error()
.into();
Expand Down
Loading