tanium / octobot

github bot with slack and jira integration
MIT License
25 stars 16 forks source link

Fix non_fmt_panic warnings. #276

Closed rcorre closed 3 years ago

rcorre commented 3 years ago

Fixes warnings like these when running cargo test:

warning: panic message is not a string literal
   --> src/repo_version.rs:309:63
    |
309 |         assert!(err.contains("Error running version script"), err);
    |                                                               ^^^
    |
    = note: `#[warn(non_fmt_panic)]` on by default
    = note: this is no longer accepted in Rust 2021
help: add a "{}" format string to Display the message
    |
309 |         assert!(err.contains("Error running version script"), "{}", err);
    |                                                               ^^^^^

warning: panic message is not a string literal
   --> tests/mocks/mock_jira.rs:122:34
    |
122 |         assert!(calls.len() > 0, format!("Unexpected call to get_issue {}", key));
    |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(non_fmt_panic)]` on by default
    = note: this is no longer accepted in Rust 2021
    = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)