-
Notifications
You must be signed in to change notification settings - Fork 335
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
Delete term set #2284
Delete term set #2284
Conversation
4685be8
to
94123d5
Compare
94123d5
to
7cb0cdf
Compare
&'a self, | ||
query: &CacheKey<'b, T>, | ||
range_end: usize, |
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.
I could be wrong... because it requires a bit of code wrangling to check that but....
wouldn't the code be clearer by changing this function into...
fn get_block<'a>(&'a self, tag: &'b T, byte_range: Range<usize>) -> Option<(Range<usize>, &CacheValue)> {}
the goal being to restrict the number of place where we manipulate CachedKey
.
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.
...
i'm not sure the refactoring I suggest is a good idea, due to the write usage.
} | ||
|
||
fn put_slice(&mut self, tag: T::Owned, byte_range: Range<usize>, bytes: OwnedBytes) { | ||
let len = byte_range.end - byte_range.start; |
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.
I suspect this code could have been mildly simpler... but it is well encapsulated and well tested, so actually I think we don't care.
fix #2217
Add support for deleting using a set of terms (and searching with a term of search).