-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: rust-lang/rust
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 60dabef
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: mina86/rust
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3c88708
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 6 commits
- 23 files changed
- 1 contributor
Commits on Feb 16, 2023
-
core: convert Pattern<'a> into Pattern<H: Haystack> (RFC 2295)
As per RFC 2295, 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). The change mostly follows the RFC though there are some differences in Haystack trait. Most notably, instead of separate StartCursor and EndCursors types, there’s one Cursor type instead. This eliminate the need for methods converting between the two types of cursors. Conversion from cursor to offset isn’t included either since as far as I can tell it’s not needed. A generic code operating on Haystack doesn’t need a concept of offset. It can operate on cursors instead. Lastly, rather than range_to_self as suggested in RFC this commit implements split_at_cursor_unchecked which simplifies default implementation of strip_prefix_of and strip_suffix_of. 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. Issue: #49802
Configuration menu - View commit details
-
Copy full SHA for 4391e6a - Browse repository at this point
Copy the full SHA 4391e6aView commit details -
core: move Pattern et al to core::pattern module (RFC 2295)
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. Just moves stuff around and adjusts documentation. Issue: #49802
Configuration menu - View commit details
-
Copy full SHA for 13fbed4 - Browse repository at this point
Copy the full SHA 13fbed4View commit details -
core: add core::pattern::loop_next helper function
Negative delta FTW. Issue: #49802
Configuration menu - View commit details
-
Copy full SHA for 0ff2270 - Browse repository at this point
Copy the full SHA 0ff2270View commit details -
core: implement Pattern<&[T]> for &[T]; get rid of SlicePattern
Implement Haystack<&[T]> and corresponding Pattern<&[T]> for &[T]. That is, provide implementation for searching for subslices in slices. This replaces SlicePattern type. To make use of this new implementations, provide a few new methods on [T] type modelling them after types on str. Specifically, introduce {starts,ends}_with_pattern, find, rfind, [T]::{split,rsplit}_once and trim{,_start,_end}_matches. Note that due to existing starts_with and ends_with methods, the _pattern suffix had to be used. This is unfortunate but the type of starts_with’s argument cannot be changed without affecting type inference and thus breaking the API. This change doesn’t implement functions returning iterators such as split_pattern or matches which in str type are built on top of the Pattern API. Issue: #49802 Issue: #56345
Configuration menu - View commit details
-
Copy full SHA for 7af0733 - Browse repository at this point
Copy the full SHA 7af0733View commit details -
Configuration menu - View commit details
-
Copy full SHA for 587e335 - Browse repository at this point
Copy the full SHA 587e335View commit details
Commits on Feb 18, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 3c88708 - Browse repository at this point
Copy the full SHA 3c88708View commit details
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 60dabef...3c88708