jaemk / cached

Rust cache structures and easy function memoization

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why does `DiskCache` need to impl `Display`?

IgnisDa opened this issue · comments

Looking at the docs for DiskCache here, it defines:

impl<K, V> DiskCache<K, V>
where
    K: Display,
    V: Serialize + DeserializeOwned

Is there any particular reason why it needs to implement Display?

If possible, could this be removed completely? If not, atleast be gated behind a feature?

@jaemk Could you take a look at this please?

@IgnisDa I think it'll move it faster, if you create a PR.

@IgnisDa I think just replacing Display with ToString will do the job.

@omid Made a PR.