Skip to content

Commit

Permalink
Cleanup WheelWriter::mtime error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Dec 6, 2022
1 parent 9d807d6 commit 82aa66a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/module_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,12 +326,8 @@ impl WheelWriter {
let min_dt = datetime!(1980-01-01 0:00 UTC);
let dt = dt.max(min_dt);

let dt = DateTime::from_time(dt);

match dt {
Ok(dt) => Ok(dt),
Err(_) => Err(anyhow!("failed to build zip DateTime")),
}
let dt = DateTime::from_time(dt).map_err(|_| anyhow!("Failed to build zip DateTime"))?;
Ok(dt)
}

/// Creates the record file and finishes the zip
Expand Down

0 comments on commit 82aa66a

Please sign in to comment.