Skip to content

Commit c7f945f

Browse files
committed
fix linting
1 parent fa71bb0 commit c7f945f

1 file changed

Lines changed: 20 additions & 15 deletions

File tree

src/cache/mod.rs

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,10 @@ where
112112
pub async fn get_uuid(&self, key: &str) -> Cached<UuidData> {
113113
let local = self.local_cache.get_uuid(key).await;
114114
if let Some(entry) = &local
115-
&& !entry.is_expired(&self.expiry.uuid) {
116-
return Cached::with_expiry(local, &self.expiry.uuid);
117-
}
115+
&& !entry.is_expired(&self.expiry.uuid)
116+
{
117+
return Cached::with_expiry(local, &self.expiry.uuid);
118+
}
118119

119120
let remote = self.remote_cache.get_uuid(key).await;
120121
match &remote {
@@ -154,9 +155,10 @@ where
154155
pub async fn get_profile(&self, uuid: &Uuid) -> Cached<ProfileData> {
155156
let local = self.local_cache.get_profile(uuid).await;
156157
if let Some(entry) = &local
157-
&& !entry.is_expired(&self.expiry.profile) {
158-
return Cached::with_expiry(local, &self.expiry.profile);
159-
}
158+
&& !entry.is_expired(&self.expiry.profile)
159+
{
160+
return Cached::with_expiry(local, &self.expiry.profile);
161+
}
160162

161163
let remote = self.remote_cache.get_profile(uuid).await;
162164
match &remote {
@@ -196,9 +198,10 @@ where
196198
pub async fn get_skin(&self, uuid: &Uuid) -> Cached<SkinData> {
197199
let local = self.local_cache.get_skin(uuid).await;
198200
if let Some(entry) = &local
199-
&& !entry.is_expired(&self.expiry.skin) {
200-
return Cached::with_expiry(local, &self.expiry.skin);
201-
}
201+
&& !entry.is_expired(&self.expiry.skin)
202+
{
203+
return Cached::with_expiry(local, &self.expiry.skin);
204+
}
202205

203206
let remote = self.remote_cache.get_skin(uuid).await;
204207
match &remote {
@@ -238,9 +241,10 @@ where
238241
pub async fn get_cape(&self, uuid: &Uuid) -> Cached<CapeData> {
239242
let local = self.local_cache.get_cape(uuid).await;
240243
if let Some(entry) = &local
241-
&& !entry.is_expired(&self.expiry.cape) {
242-
return Cached::with_expiry(local, &self.expiry.cape);
243-
}
244+
&& !entry.is_expired(&self.expiry.cape)
245+
{
246+
return Cached::with_expiry(local, &self.expiry.cape);
247+
}
244248

245249
let remote = self.remote_cache.get_cape(uuid).await;
246250
match &remote {
@@ -280,9 +284,10 @@ where
280284
pub async fn get_head(&self, uuid: &(Uuid, bool)) -> Cached<HeadData> {
281285
let local = self.local_cache.get_head(uuid).await;
282286
if let Some(entry) = &local
283-
&& !entry.is_expired(&self.expiry.head) {
284-
return Cached::with_expiry(local, &self.expiry.head);
285-
}
287+
&& !entry.is_expired(&self.expiry.head)
288+
{
289+
return Cached::with_expiry(local, &self.expiry.head);
290+
}
286291

287292
let remote = self.remote_cache.get_head(uuid).await;
288293
match &remote {

0 commit comments

Comments
 (0)