diff options
Diffstat (limited to 'azalea-auth/src/cache.rs')
| -rwxr-xr-x | azalea-auth/src/cache.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/azalea-auth/src/cache.rs b/azalea-auth/src/cache.rs index 404b05ff..1e8aee10 100755 --- a/azalea-auth/src/cache.rs +++ b/azalea-auth/src/cache.rs @@ -58,6 +58,15 @@ impl<T> ExpiringValue<T> { } } +impl<T: Clone> Clone for ExpiringValue<T> { + fn clone(&self) -> Self { + Self { + expires_at: self.expires_at, + data: self.data.clone(), + } + } +} + async fn get_entire_cache(cache_file: &Path) -> Result<Vec<CachedAccount>, CacheError> { let mut cache: Vec<CachedAccount> = Vec::new(); if cache_file.exists() { |
