haydnv/freqfs

allow access by a key type which implements `PartialEq<str> + PartialOrd<str>`

Closed this issue · 1 comments

This will avoid the allocations incurred by calling K::to_string on potentially every lookup. For example:

impl<File> Dir<File> {
    pub fn get_file(&self, name: &K) -> Option<File> where K: PartialEq<str> + PartialOrd<str>;
    // ...
}
haydnv commented

This was fixed by commit 33250ce