diff --git a/asyncgit/src/blame.rs b/asyncgit/src/blame.rs index 9a2d562f..0804aadc 100644 --- a/asyncgit/src/blame.rs +++ b/asyncgit/src/blame.rs @@ -25,7 +25,6 @@ struct Request(R, Option); #[derive(Default, Clone)] struct LastResult { params: P, - hash: u64, result: R, } @@ -154,7 +153,6 @@ impl AsyncBlame { let mut last = arc_last.lock()?; *last = Some(LastResult { result: file_blame, - hash, params, }); } diff --git a/asyncgit/src/diff.rs b/asyncgit/src/diff.rs index 45ec3408..bedc9e2d 100644 --- a/asyncgit/src/diff.rs +++ b/asyncgit/src/diff.rs @@ -42,7 +42,6 @@ struct Request(R, Option); #[derive(Default, Clone)] struct LastResult { params: P, - hash: u64, result: R, } @@ -189,7 +188,6 @@ impl AsyncDiff { let mut last = arc_last.lock()?; *last = Some(LastResult { result: res, - hash, params, }); } diff --git a/asyncgit/src/fetch.rs b/asyncgit/src/fetch.rs index ed8caa6c..d7fb4506 100644 --- a/asyncgit/src/fetch.rs +++ b/asyncgit/src/fetch.rs @@ -23,10 +23,9 @@ pub struct FetchRequest { pub basic_credential: Option, } +//TODO: since this is empty we can go with a simple AtomicBool to mark that we are fetching or not #[derive(Default, Clone, Debug)] -struct FetchState { - request: FetchRequest, -} +struct FetchState {} /// pub struct AsyncFetch { @@ -116,16 +115,14 @@ impl AsyncFetch { Ok(()) } - fn set_request(&self, params: &FetchRequest) -> Result<()> { + fn set_request(&self, _params: &FetchRequest) -> Result<()> { let mut state = self.state.lock()?; if state.is_some() { return Err(Error::Generic("pending request".into())); } - *state = Some(FetchState { - request: params.clone(), - }); + *state = Some(FetchState {}); Ok(()) } diff --git a/asyncgit/src/push.rs b/asyncgit/src/push.rs index 9c4f14cb..4bd88a38 100644 --- a/asyncgit/src/push.rs +++ b/asyncgit/src/push.rs @@ -27,10 +27,9 @@ pub struct PushRequest { pub basic_credential: Option, } +//TODO: since this is empty we can go with a simple AtomicBool to mark that we are fetching or not #[derive(Default, Clone, Debug)] -struct PushState { - request: PushRequest, -} +struct PushState {} /// pub struct AsyncPush { @@ -123,16 +122,14 @@ impl AsyncPush { Ok(()) } - fn set_request(&self, params: &PushRequest) -> Result<()> { + fn set_request(&self, _params: &PushRequest) -> Result<()> { let mut state = self.state.lock()?; if state.is_some() { return Err(Error::Generic("pending request".into())); } - *state = Some(PushState { - request: params.clone(), - }); + *state = Some(PushState {}); Ok(()) } diff --git a/asyncgit/src/push_tags.rs b/asyncgit/src/push_tags.rs index 01fc1cff..aadd36c0 100644 --- a/asyncgit/src/push_tags.rs +++ b/asyncgit/src/push_tags.rs @@ -21,10 +21,9 @@ pub struct PushTagsRequest { pub basic_credential: Option, } +//TODO: since this is empty we can go with a simple AtomicBool to mark that we are fetching or not #[derive(Default, Clone, Debug)] -struct PushState { - request: PushTagsRequest, -} +struct PushState {} /// pub struct AsyncPushTags { @@ -110,16 +109,14 @@ impl AsyncPushTags { Ok(()) } - fn set_request(&self, params: &PushTagsRequest) -> Result<()> { + fn set_request(&self, _params: &PushTagsRequest) -> Result<()> { let mut state = self.state.lock()?; if state.is_some() { return Err(Error::Generic("pending request".into())); } - *state = Some(PushState { - request: params.clone(), - }); + *state = Some(PushState {}); Ok(()) }