Avatar for the pubgrub-rs user
pubgrub-rs
pubgrub
BlogDocsChangelog

Allow `Ranges::contains` to accept borrows, e.g. `&str` for `Ranges<String>`

#301Merged
Comparing
konsti/dev/borrow
(
6992709
) with
dev
(
3bef331
)
CodSpeed Performance Gauge
0%
Improvements
0
Regressions
0
Untouched
6
New
0
Dropped
0
Ignored
0

Benchmarks

Passed

backtracking_singletons
benches/backtracking.rs::benches::bench_group::backtracking_singletons
CodSpeed Performance Gauge
0%
4.4 s
4.4 s
backtracking_disjoint_versions
benches/backtracking.rs::benches::bench_group::backtracking_disjoint_versions
CodSpeed Performance Gauge
0%
2.4 s
2.4 s
backtracking_ranges
benches/backtracking.rs::benches::bench_group::backtracking_ranges
CodSpeed Performance Gauge
0%
2 s
2 s
sudoku-hard
benches/sudoku.rs::benches::bench_solve::sudoku-hard
CodSpeed Performance Gauge
0%
4.2 ms
4.2 ms
sudoku-easy
benches/sudoku.rs::benches::bench_solve::sudoku-easy
CodSpeed Performance Gauge
0%
3.9 ms
3.9 ms
large_case_u16_NumberVersion.ron
benches/large_case.rs::benches::bench_nested::large_cases::large_case_u16_NumberVersion.ron
CodSpeed Performance Gauge
0%
25.6 ms
25.6 ms

Commits

Click on a commit to change the comparison range
Base
dev
3bef331
0%
Allow `Ranges::contains` to accept (e.g.) `&str` for `Ranges<String>` (#35) ## Summary This PR borrows a trick from [HashMap](https://doc.rust-lang.org/std/collections/struct.HashMap.html#method.contains_key) to enable users to pass (e.g.) `&str` to `Ranges::contains`, given `Ranges<String>`.
6992709
23 days ago
by charliermarsh
Home Terms PrivacyDocs