Skip to content

Commit 26677f7

Browse files
authored
controllers/krate/publish: Remove obsolete license.clone() call (#7193)
Looks like this is no longer necessary...
1 parent 44f5880 commit 26677f7

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/controllers/krate/publish.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,6 @@ pub async fn publish(app: AppState, req: BytesRequest) -> AppResult<Json<GoodCra
192192
)));
193193
}
194194

195-
// This is only redundant for now. Eventually the duplication will be removed.
196-
let license = metadata.license.clone();
197-
198195
// Read tarball from request
199196
let hex_cksum: String = Sha256::digest(&tarball_bytes).encode_hex();
200197

@@ -213,7 +210,7 @@ pub async fn publish(app: AppState, req: BytesRequest) -> AppResult<Json<GoodCra
213210
krate.id,
214211
vers,
215212
&features,
216-
license,
213+
metadata.license,
217214
license_file,
218215
// Downcast is okay because the file length must be less than the max upload size
219216
// to get here, and max upload sizes are way less than i32 max

0 commit comments

Comments
 (0)