Skip to content

Commit 177bf43

Browse files
committed
ref: fixed spelling
1 parent c7b4af1 commit 177bf43

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

crates/cli/src/command/download.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ pub async fn handle_download(tag: Option<String>, features: Option<Vec<String>>)
4848
}
4949

5050
async fn download_definitions_as_bytes(tag: Option<String>) -> Bytes {
51+
let max_retries = 3;
5152
let client = reqwest::Client::new();
5253

5354
let url = match tag {
@@ -74,7 +75,6 @@ async fn download_definitions_as_bytes(tag: Option<String>) -> Bytes {
7475
}
7576
}
7677

77-
let max_retires = 3;
7878
let mut retries = 0;
7979
let mut result = None;
8080
let mut succeeded = false;
@@ -85,15 +85,15 @@ async fn download_definitions_as_bytes(tag: Option<String>) -> Bytes {
8585
succeeded = true;
8686
result = Some(release_request);
8787
} else {
88-
if retries >= max_retires {
89-
panic!("Reached max retires while downloading release.")
88+
if retries >= max_retries {
89+
panic!("Reached max retries while downloading release.")
9090
}
9191

9292
retries += 1;
9393
error!(
9494
"Retrying ({}/{}) download. Failed with status code: {:?}",
9595
retries,
96-
max_retires,
96+
max_retries,
9797
release_request.status()
9898
);
9999
}
@@ -127,7 +127,7 @@ async fn download_definitions_as_bytes(tag: Option<String>) -> Bytes {
127127
}
128128
};
129129

130-
let mut asset_retires = 0;
130+
let mut asset_retries = 0;
131131
let mut asset_result = None;
132132
let mut asset_success = false;
133133

@@ -148,15 +148,15 @@ async fn download_definitions_as_bytes(tag: Option<String>) -> Bytes {
148148
asset_success = true;
149149
asset_result = Some(response);
150150
} else {
151-
if asset_retires >= max_retires {
152-
panic!("Reached max retires while downloading asset!");
151+
if asset_retries >= max_retries {
152+
panic!("Reached max retries while downloading asset!");
153153
}
154154

155-
asset_retires += 1;
155+
asset_retries += 1;
156156
error!(
157157
"Retrying ({}/{}) asset download. Failed with status code: {:?}",
158-
asset_retires,
159-
max_retires,
158+
asset_retries,
159+
max_retries,
160160
response.status()
161161
);
162162
}

0 commit comments

Comments
 (0)