Skip to content

Shut up non_fmt_panic warning#284

Merged
jhpratt merged 2 commits into
BurntSushi:masterfrom
neithernut:fix-panic-format
Mar 5, 2025
Merged

Shut up non_fmt_panic warning#284
jhpratt merged 2 commits into
BurntSushi:masterfrom
neithernut:fix-panic-format

Conversation

@neithernut
Copy link
Copy Markdown
Contributor

Like a few other macros, panic! accepts a format string and arguments.
The format string is meant to be static and calling it with a message string will generate a warning.
Currently, the warning also indicates that rustc will generate an error instead in the near future.

Like a few other macros, `panic!` accepts a format string and arguments.
The format string is meant to be static and calling it with a message
string will generate a warning. Currently, the warning also indicates
that `rustc` will generate an error instead in the near future.
The `panic!` matro itself does take a foramt string. In fact, the
redundant format generated a warning.
@neithernut
Copy link
Copy Markdown
Contributor Author

Fixes #305.

@schneiderfelipe
Copy link
Copy Markdown
Contributor

@BurntSushi can we get this merged? ❤️

@jhpratt jhpratt merged commit 88f1eca into BurntSushi:master Mar 5, 2025
@neithernut neithernut deleted the fix-panic-format branch March 10, 2025 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants