Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Clippy
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
  • Loading branch information
ggwpez committed May 14, 2023
commit c899f92d961cd2b8a113cc161e642a1293bc9ddb
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