spacejam / sled

the champagne of beta embedded databases
Apache License 2.0
7.89k stars 377 forks source link

Remove implicit `Sized` bound on `Tree::range` and others #1499

Open Rafferty97 opened 4 months ago

Rafferty97 commented 4 months ago

See issue #1497.

The type parameter K on the method Tree::range has an implicit Sized constraint, but it unnecessarily constrains the flexibility of the API. For example, it's not currently possible to call Tree::range with a range of RangeBounds<[u8]> as [u8] is not sized.

Similar reasoning applies to the other two methods of Tree that this PR adjusts in a similar fashion.