Skip to content

Commit 401daf1

Browse files
committed
Fix lint warnings for Rust 1.57
1 parent edcea39 commit 401daf1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/uploader.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ struct Transmission {
2424
#[derive(Debug, Deserialize)]
2525
#[serde(rename_all = "camelCase")]
2626
struct TransmissionItem {
27-
index: usize,
2827
status_code: u16,
29-
message: String,
3028
}
3129

3230
/// Sends a telemetry items to the server.
@@ -89,7 +87,7 @@ fn handle_response(response: Response<Bytes>) -> Result<(), Error> {
8987
.map_err(Error::UploadDeserializeResponse)?;
9088
if content.items_received == content.items_accepted {
9189
Ok(())
92-
} else if content.errors.iter().any(|item| can_retry_item(item)) {
90+
} else if content.errors.iter().any(can_retry_item) {
9391
Err(Error::Upload(format!(
9492
"{}: Some items may be retried. However we don't currently support this.",
9593
status
@@ -110,7 +108,7 @@ fn handle_response(response: Response<Bytes>) -> Result<(), Error> {
110108
}
111109
status @ STATUS_INTERNAL_SERVER_ERROR => {
112110
if let Ok(content) = serde_json::from_slice::<Transmission>(response.body()) {
113-
if content.errors.iter().any(|item| can_retry_item(item)) {
111+
if content.errors.iter().any(can_retry_item) {
114112
Err(Error::Upload(format!(
115113
"{}: Some items may be retried. However we don't currently support this.",
116114
status

0 commit comments

Comments
 (0)