Skip to content

Commit

Permalink
Merge pull request #210 from IgnisDa/remove-display-trait
Browse files Browse the repository at this point in the history
Update `DiskCache` to use `ToString` trait instead of `Display`
  • Loading branch information
jaemk authored Jun 13, 2024
2 parents f1cfbc1 + f72a245 commit bf832e4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/stores/disk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use serde::Serialize;
use sled::Db;
use std::marker::PhantomData;
use std::path::Path;
use std::{fmt::Display, path::PathBuf, time::SystemTime};
use std::{path::PathBuf, time::SystemTime};

pub struct DiskCacheBuilder<K, V> {
seconds: Option<u64>,
Expand Down Expand Up @@ -36,7 +36,7 @@ const DISK_FILE_VERSION: u64 = 1;

impl<K, V> DiskCacheBuilder<K, V>
where
K: Display,
K: ToString,
V: Serialize + DeserializeOwned,
{
/// Initialize a `DiskCacheBuilder`
Expand Down Expand Up @@ -158,7 +158,7 @@ pub struct DiskCache<K, V> {

impl<K, V> DiskCache<K, V>
where
K: Display,
K: ToString,
V: Serialize + DeserializeOwned,
{
#[allow(clippy::new_ret_no_self)]
Expand Down Expand Up @@ -235,7 +235,7 @@ impl<V> CachedDiskValue<V> {

impl<K, V> IOCached<K, V> for DiskCache<K, V>
where
K: Display,
K: ToString,
V: Serialize + DeserializeOwned,
{
type Error = DiskCacheError;
Expand Down

0 comments on commit bf832e4

Please sign in to comment.