Skip to content
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

Update DiskCache to use ToString trait instead of Display #210

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading