Skip to content

Commit 7d63cc7

Browse files
committed
models/version: Remove unused parameter from NewVersion::new() fn
1 parent 7b55b13 commit 7d63cc7

File tree

5 files changed

+0
-9
lines changed

5 files changed

+0
-9
lines changed

src/controllers/krate/publish.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,6 @@ pub async fn publish(app: AppState, req: BytesRequest) -> AppResult<Json<GoodCra
180180
max_upload_size: None,
181181
};
182182

183-
let license_file = license_file.as_deref();
184-
185183
validate_url(persist.homepage, "homepage")?;
186184
validate_url(persist.documentation, "documentation")?;
187185
validate_url(persist.repository, "repository")?;
@@ -229,7 +227,6 @@ pub async fn publish(app: AppState, req: BytesRequest) -> AppResult<Json<GoodCra
229227
vers,
230228
&features,
231229
license,
232-
license_file,
233230
// Downcast is okay because the file length must be less than the max upload size
234231
// to get here, and max upload sizes are way less than i32 max
235232
content_length as i32,

src/downloads_counter.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,6 @@ mod tests {
455455
&Version::parse(&format!("{}.0.0", self.next_version)).unwrap(),
456456
&BTreeMap::new(),
457457
None,
458-
None,
459458
0,
460459
self.user.id,
461460
"0000000000000000000000000000000000000000000000000000000000000000".to_string(),

src/models/version.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ impl NewVersion {
139139
num: &semver::Version,
140140
features: &BTreeMap<String, Vec<String>>,
141141
license: Option<String>,
142-
#[allow(unused_variables)] license_file: Option<&str>,
143142
crate_size: i32,
144143
published_by: i32,
145144
checksum: String,

src/tests/builders/version.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ pub struct VersionBuilder<'a> {
1414
dependencies: Vec<(i32, Option<&'static str>)>,
1515
features: BTreeMap<String, Vec<String>>,
1616
license: Option<&'a str>,
17-
license_file: Option<&'a str>,
1817
num: semver::Version,
1918
size: i32,
2019
yanked: bool,
@@ -40,7 +39,6 @@ impl<'a> VersionBuilder<'a> {
4039
dependencies: Vec::new(),
4140
features: BTreeMap::new(),
4241
license: None,
43-
license_file: None,
4442
num,
4543
size: 0,
4644
yanked: false,
@@ -106,7 +104,6 @@ impl<'a> VersionBuilder<'a> {
106104
&self.num,
107105
&self.features,
108106
license,
109-
self.license_file,
110107
self.size,
111108
published_by,
112109
self.checksum,

src/worker/update_downloads.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ mod test {
105105
&semver::Version::parse("1.0.0").unwrap(),
106106
&BTreeMap::new(),
107107
None,
108-
None,
109108
0,
110109
user_id,
111110
"0000000000000000000000000000000000000000000000000000000000000000".to_string(),

0 commit comments

Comments
 (0)