-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix documentation for StrExt::trim_matches #23455
Conversation
r? @gankro (rust_highfive has picked a reviewer for you, use r? to override) |
@@ -923,11 +923,12 @@ pub trait StrExt: Index<RangeFull, Output = str> { | |||
|
|||
/// Returns a string with all pre- and suffixes that match a pattern repeatedly removed. | |||
/// | |||
/// The pattern can be a simple `&str`, or a closure that determines the split. | |||
/// The pattern is required to be a `DoubleEndedSearcher`, therefore `&str` patterns cannot | |||
/// be used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This lost the 'closure' aspect. I would change this to read:
The pattern can be any
DoubleEndedSearcher
, including a closure that determines the split.
This keeps it overall more consistent with the rest of the other examples.
r=me after the little nit |
@steveklabnik updated. |
Thanks so much! |
@bors: r+ rollup |
📌 Commit 34c48db has been approved by |
No description provided.