Avoid some warnings from Clippy#299
Conversation
neithernut
left a comment
There was a problem hiding this comment.
See #284 for alternative changes for the non_fmt_panic-bits. This is not to say that they can't/shouldn't be included here (too).
| let n_tests_passed = match self.quicktest(f) { | ||
| Ok(n_tests_passed) => n_tests_passed, | ||
| Err(result) => panic!(result.failed_msg()), | ||
| Err(result) => panic!("{}", result.failed_msg()), |
There was a problem hiding this comment.
Hmmm I don't think this is right... What's the motivation for this change?
There was a problem hiding this comment.
Like with write!, print! or good old printf, passing dynamic string-data as format string (panic! can format messages for some time now) is frowned upon. Current versions of rust will report a warning during compilation for this line, and probably an error in the future.
There was a problem hiding this comment.
Ah I see. Gotya. Yeah this is good, thanks for catching it!
There was a problem hiding this comment.
I think I'll wait on #284 and remove those changes from this PR, if that's OK with you @neithernut.
There was a problem hiding this comment.
I'd be ok with this. But I doubt that we'll see anything merged in this repo in the near future.
|
Fixes #305. |
|
GitHub is being buggy, so I've merged this manually 👍 |
This does very small changes to remove some warnings Clippy complains about.