Add a starts_with(s: &str) -> bool
method for fmt::Arguments
?
#66773
Labels
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
It's currently very cumbersome to check whether a panic message starts with an expected
&str
inno_std
mode:(If there is an easier way to achieve this, please let me know.)
How about adding a
starts_with(&self, &str) -> bool
method tofmt::Arguments
? With such a method, the above could be shortened to:I would be happy to write a PR that adds this as an unstable method if it is desired.
The text was updated successfully, but these errors were encountered: