Repository navigation
Conversation
|
cc @Amanieu, @folkertdev, @sayantn |
|
r? @JohnTitor rustbot has assigned @JohnTitor. Use Why was this reviewer chosen?The reviewer was selected based on:
|
I'm not sure what's the right approach here. Sync it after this lands? A separate pull request? |
|
This is fine, it's a tiny change, we'll handle the sync after it merges. |
|
r? @nia-e |
|
#161608 (review) - I'm going to try this |
9471adf to
0a4f4c4
Compare
This comment has been minimized.
This comment has been minimized.
0a4f4c4 to
ae668d2
Compare
This comment has been minimized.
This comment has been minimized.
|
@nia-e thoughts? Should I ask rustbot for reroll? |
This comment has been minimized.
This comment has been minimized.
81a936e to
2524e8f
Compare
This comment has been minimized.
This comment has been minimized.
2524e8f to
3a199dd
Compare
This comment has been minimized.
This comment has been minimized.
core::str::pattern::Pattern to work with any haystacks
Add a Haystack trait describing something that can be searched in and make core::str::Pattern (and related types) generic on that trait. This will allow Pattern to be used for types other than str (most notably OsStr). This somewhat follows the Pattern API 2.0 design. While that design is apparently abandoned (?), it is somewhat helpful when going for patterns on OsStr, so I’m going with it unless someone tells me otherwise. ;) For now leave Pattern, Haystack et al in core::str::pattern. Since they are no longer str-specific, I’ll move them to core::pattern in future commit. This one leaves them in place to make the diff smaller. @pacak: Original code had pattern parametrized by a reference (`Pattern<&str>`), I changed it to be `Pattern<str>`. Original code had indices in Haystack abstracted as an associated type Cursor. Replaced with usize - Cursor adds noise with not much value. Changed wording in 2-3 places - for example Searcher is generic over a few types so it makes more sense to talk about split points in general with utf8 split points as an example for `&str`.
Pattern is no longer str-specific, so move it from core::str::pattern module to a new core::pattern module. This introduces no changes in behaviour or implementation.
core::str::pattern::Pattern to work with any haystacks3a199dd to
816f4c7
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@rustbot reroll |
|
@hanna-kruppe: this pull request is part of a stacked pull request (full list in the description), at some point I was asked to split it into smaller parts. The whole stack needs to be reviewed/merged eventually. There is a zulip chat with some discussion already, but not much progress on the pull request itself. I was pretty confident that the whole stack was ready back in August, but after a few rebases and refactors I had to do to accommodate whatever was merged - there might be something missing and I can't really see it, but I'll do whatever needs to be done. There's two big parts to those pull requests, one group makes |
|
I'm sorry to disappoint when you've been already waiting for reviews for so long, but I can't review this:
I'm likely not alone with that, so I wouldn't expect re-rolling some more to find someone who's eager to review this. As much as I hate to send you back to square one, I suggest trying to go back to Zulip and talk to the libs team about finding someone who has the knowledge, interest, and time to shepherd this huge project in general (even if they may not review every single PR). I realize that you've tried that and it didn't work, but rolling random reviewers also doesn't work well for such huge projects. |
|
Hmmm... Suggestion to reroll came from zulip :) There's ACP rust-lang/libs-team#311 and "Going to count this as being tracked by #49802". But I totally understand you. Will keep asking there I guess. |
|
Oops, didn't realize you were told to re-roll by Trevor on Zulip. I don't want to stop you from re-rolling some more, but I'm pessimistic about the odds.
Thanks. At a glance the |
Implementation in this pull request predates that comment by a year... Also Anyway, waiting for a reply on zulip I guess.... |
|
So, resharing what I mentioned on Zulip: unfortunately I don't think we have the bandwidth as a team to review this right now, but once I'm done with #156496 I think I should be fine to take this on. I just don't want to promise anything since already taking on one big review has been a lot. r? clarfonthey |
View all comments
OsStrspecifically)core::str::Patterntocore::pattern::Patternto reflect thatNot very useful on its own, but required to extend pattern splitting API to
OsStr.Contains changes from #161604, I'll rebase one that test lands.
Part of the #160971 cinematic universe.
This PR is part of a stack containing 16 PRs:
maincore::str::pattern::Patternto work with any haystacks" (this PR)