Skip to content

Commit

Permalink
Ignore needless_raw_string_hashes pedantic clippy lint in test
Browse files Browse the repository at this point in the history
    warning: unnecessary hashes around raw string literal
       --> tests/test_display.rs:354:12
        |
    354 |     assert(r#"raw brace left {"#, Error::BraceLeft);
        |            ^^^^^^^^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
        = note: `-W clippy::needless-raw-string-hashes` implied by `-W clippy::pedantic`
        = help: to override `-W clippy::pedantic` add `#[allow(clippy::needless_raw_string_hashes)]`
    help: remove all the hashes around the string literal
        |
    354 -     assert(r#"raw brace left {"#, Error::BraceLeft);
    354 +     assert(r"raw brace left {", Error::BraceLeft);
        |

    warning: unnecessary hashes around raw string literal
       --> tests/test_display.rs:355:12
        |
    355 |     assert(r#"raw brace left 2 \x7B"#, Error::BraceLeft2);
        |            ^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
    help: remove all the hashes around the string literal
        |
    355 -     assert(r#"raw brace left 2 \x7B"#, Error::BraceLeft2);
    355 +     assert(r"raw brace left 2 \x7B", Error::BraceLeft2);
        |

    warning: unnecessary hashes around raw string literal
       --> tests/test_display.rs:356:12
        |
    356 |     assert(r#"raw brace right }"#, Error::BraceRight);
        |            ^^^^^^^^^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
    help: remove all the hashes around the string literal
        |
    356 -     assert(r#"raw brace right }"#, Error::BraceRight);
    356 +     assert(r"raw brace right }", Error::BraceRight);
        |

    warning: unnecessary hashes around raw string literal
       --> tests/test_display.rs:357:12
        |
    357 |     assert(r#"raw brace right 2 \x7D"#, Error::BraceRight2);
        |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
    help: remove all the hashes around the string literal
        |
    357 -     assert(r#"raw brace right 2 \x7D"#, Error::BraceRight2);
    357 +     assert(r"raw brace right 2 \x7D", Error::BraceRight2);
        |
  • Loading branch information
dtolnay committed Feb 11, 2024
1 parent d09c418 commit d43b759
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_display.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::uninlined_format_args)]
#![allow(clippy::needless_raw_string_hashes, clippy::uninlined_format_args)]

use std::fmt::{self, Display};
use thiserror::Error;
Expand Down

0 comments on commit d43b759

Please sign in to comment.