Skip to content

Commit

Permalink
controllers/krate/publish: Remove obsolete license.clone() call (#7193
Browse files Browse the repository at this point in the history
)

Looks like this is no longer necessary...
  • Loading branch information
Turbo87 authored Sep 27, 2023
1 parent 44f5880 commit 26677f7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/controllers/krate/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,6 @@ pub async fn publish(app: AppState, req: BytesRequest) -> AppResult<Json<GoodCra
)));
}

// This is only redundant for now. Eventually the duplication will be removed.
let license = metadata.license.clone();

// Read tarball from request
let hex_cksum: String = Sha256::digest(&tarball_bytes).encode_hex();

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

0 comments on commit 26677f7

Please sign in to comment.