Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
  • Loading branch information
ggwpez committed May 14, 2023
1 parent 5791b9a commit c899f92
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
run: cargo fmt --all -- --check

- name: Check no-std
run: cargo check --no-default-features
run: cargo check --all-targets --no-default-features --locked

- name: Build
run: cargo build --all-targets --all-features --locked
Expand Down
14 changes: 7 additions & 7 deletions proc-macro-warning/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl FormattedWarning {
/// .old("my_macro()")
/// .new("my_macro::new()")
/// .help_link("https:://example.com")
/// // Normally you use the input span, but this is an example:
/// // Normally you use the input span, but this is an example:
/// .span(proc_macro2::Span::call_site())
/// .build();
///
Expand Down Expand Up @@ -207,12 +207,12 @@ impl Warning {
}
}

impl Into<FormattedWarning> for Warning {
fn into(self) -> FormattedWarning {
match self {
Self::Deprecated { span, .. } => FormattedWarning::Deprecated {
name: self.final_deprecated_name(),
note: self.final_deprecated_message(),
impl From<Warning> for FormattedWarning {
fn from(val: Warning) -> Self {
match val {
Warning::Deprecated { span, .. } => FormattedWarning::Deprecated {
name: val.final_deprecated_name(),
note: val.final_deprecated_message(),
span: Some(span),
},
}
Expand Down

0 comments on commit c899f92

Please sign in to comment.