Skip to content

Commit fa051e9

Browse files
author
Stephan Dilly
committed
nightly clippy fixes
1 parent 8729530 commit fa051e9

File tree

5 files changed

+12
-25
lines changed

5 files changed

+12
-25
lines changed

asyncgit/src/blame.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ struct Request<R, A>(R, Option<A>);
2525
#[derive(Default, Clone)]
2626
struct LastResult<P, R> {
2727
params: P,
28-
hash: u64,
2928
result: R,
3029
}
3130

@@ -154,7 +153,6 @@ impl AsyncBlame {
154153
let mut last = arc_last.lock()?;
155154
*last = Some(LastResult {
156155
result: file_blame,
157-
hash,
158156
params,
159157
});
160158
}

asyncgit/src/diff.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ struct Request<R, A>(R, Option<A>);
4242
#[derive(Default, Clone)]
4343
struct LastResult<P, R> {
4444
params: P,
45-
hash: u64,
4645
result: R,
4746
}
4847

@@ -189,7 +188,6 @@ impl AsyncDiff {
189188
let mut last = arc_last.lock()?;
190189
*last = Some(LastResult {
191190
result: res,
192-
hash,
193191
params,
194192
});
195193
}

asyncgit/src/fetch.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@ pub struct FetchRequest {
2323
pub basic_credential: Option<BasicAuthCredential>,
2424
}
2525

26+
//TODO: since this is empty we can go with a simple AtomicBool to mark that we are fetching or not
2627
#[derive(Default, Clone, Debug)]
27-
struct FetchState {
28-
request: FetchRequest,
29-
}
28+
struct FetchState {}
3029

3130
///
3231
pub struct AsyncFetch {
@@ -116,16 +115,14 @@ impl AsyncFetch {
116115
Ok(())
117116
}
118117

119-
fn set_request(&self, params: &FetchRequest) -> Result<()> {
118+
fn set_request(&self, _params: &FetchRequest) -> Result<()> {
120119
let mut state = self.state.lock()?;
121120

122121
if state.is_some() {
123122
return Err(Error::Generic("pending request".into()));
124123
}
125124

126-
*state = Some(FetchState {
127-
request: params.clone(),
128-
});
125+
*state = Some(FetchState {});
129126

130127
Ok(())
131128
}

asyncgit/src/push.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,9 @@ pub struct PushRequest {
2727
pub basic_credential: Option<BasicAuthCredential>,
2828
}
2929

30+
//TODO: since this is empty we can go with a simple AtomicBool to mark that we are fetching or not
3031
#[derive(Default, Clone, Debug)]
31-
struct PushState {
32-
request: PushRequest,
33-
}
32+
struct PushState {}
3433

3534
///
3635
pub struct AsyncPush {
@@ -123,16 +122,14 @@ impl AsyncPush {
123122
Ok(())
124123
}
125124

126-
fn set_request(&self, params: &PushRequest) -> Result<()> {
125+
fn set_request(&self, _params: &PushRequest) -> Result<()> {
127126
let mut state = self.state.lock()?;
128127

129128
if state.is_some() {
130129
return Err(Error::Generic("pending request".into()));
131130
}
132131

133-
*state = Some(PushState {
134-
request: params.clone(),
135-
});
132+
*state = Some(PushState {});
136133

137134
Ok(())
138135
}

asyncgit/src/push_tags.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ pub struct PushTagsRequest {
2121
pub basic_credential: Option<BasicAuthCredential>,
2222
}
2323

24+
//TODO: since this is empty we can go with a simple AtomicBool to mark that we are fetching or not
2425
#[derive(Default, Clone, Debug)]
25-
struct PushState {
26-
request: PushTagsRequest,
27-
}
26+
struct PushState {}
2827

2928
///
3029
pub struct AsyncPushTags {
@@ -110,16 +109,14 @@ impl AsyncPushTags {
110109
Ok(())
111110
}
112111

113-
fn set_request(&self, params: &PushTagsRequest) -> Result<()> {
112+
fn set_request(&self, _params: &PushTagsRequest) -> Result<()> {
114113
let mut state = self.state.lock()?;
115114

116115
if state.is_some() {
117116
return Err(Error::Generic("pending request".into()));
118117
}
119118

120-
*state = Some(PushState {
121-
request: params.clone(),
122-
});
119+
*state = Some(PushState {});
123120

124121
Ok(())
125122
}

0 commit comments

Comments
 (0)