From 64d31d0c0226141db72b5907ee21792dd3e92dfa Mon Sep 17 00:00:00 2001 From: Fuwn Date: Thu, 24 Mar 2022 00:06:59 +0000 Subject: feat: cache github api This commit allows The Senpy Club API to cache GitHub's API response, refreshing the cache every fifty accesses. This commit also gets rid of a few dependencies which were replaced by their standard library counterparts. --- src/structures.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/structures.rs') diff --git a/src/structures.rs b/src/structures.rs index 3e9b7bc..4c59d51 100644 --- a/src/structures.rs +++ b/src/structures.rs @@ -20,7 +20,7 @@ use serde_derive::{Deserialize, Serialize}; -#[derive(Serialize, Deserialize)] +#[derive(Serialize, Deserialize, Clone)] pub struct GitHubAPIResponse { pub sha: String, pub url: String, @@ -38,7 +38,7 @@ impl Default for GitHubAPIResponse { } } -#[derive(Serialize, Deserialize, Default)] +#[derive(Serialize, Deserialize, Default, Clone)] pub struct GitHubAPIResponseTree { pub path: String, pub mode: String, -- cgit v1.2.3