mirror of
https://github.com/gitui-org/gitui
synced 2026-05-24 01:18:21 +00:00
nightly clippy fixes
This commit is contained in:
parent
8729530ba9
commit
fa051e9226
5 changed files with 12 additions and 25 deletions
|
|
@ -25,7 +25,6 @@ struct Request<R, A>(R, Option<A>);
|
|||
#[derive(Default, Clone)]
|
||||
struct LastResult<P, R> {
|
||||
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,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ struct Request<R, A>(R, Option<A>);
|
|||
#[derive(Default, Clone)]
|
||||
struct LastResult<P, R> {
|
||||
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,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,10 +23,9 @@ pub struct FetchRequest {
|
|||
pub basic_credential: Option<BasicAuthCredential>,
|
||||
}
|
||||
|
||||
//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(())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,10 +27,9 @@ pub struct PushRequest {
|
|||
pub basic_credential: Option<BasicAuthCredential>,
|
||||
}
|
||||
|
||||
//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(())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,10 +21,9 @@ pub struct PushTagsRequest {
|
|||
pub basic_credential: Option<BasicAuthCredential>,
|
||||
}
|
||||
|
||||
//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(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue