Upgrade zip to 0.6.4
This project was upgraded with external_updater.
Usage: tools/external_updater/updater.sh update rust/crates/zip
For more info, check https://cs.android.com/android/platform/superproject/+/master:tools/external_updater/README.md
Test: TreeHugger
Change-Id: I27f08defe9ad73375fea1de1028cdf4ed9da500f
diff --git a/src/result.rs b/src/result.rs
index 72a30e4..00d558c 100644
--- a/src/result.rs
+++ b/src/result.rs
@@ -44,9 +44,9 @@
impl fmt::Display for ZipError {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
match self {
- ZipError::Io(err) => write!(fmt, "{}", err),
- ZipError::InvalidArchive(err) => write!(fmt, "invalid Zip archive: {}", err),
- ZipError::UnsupportedArchive(err) => write!(fmt, "unsupported Zip archive: {}", err),
+ ZipError::Io(err) => write!(fmt, "{err}"),
+ ZipError::InvalidArchive(err) => write!(fmt, "invalid Zip archive: {err}"),
+ ZipError::UnsupportedArchive(err) => write!(fmt, "unsupported Zip archive: {err}"),
ZipError::FileNotFound => write!(fmt, "specified file not found in archive"),
}
}
@@ -81,3 +81,18 @@
io::Error::new(io::ErrorKind::Other, err)
}
}
+
+/// Error type for time parsing
+#[derive(Debug)]
+pub struct DateTimeRangeError;
+
+impl fmt::Display for DateTimeRangeError {
+ fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
+ write!(
+ fmt,
+ "a date could not be represented within the bounds the MS-DOS date range (1980-2107)"
+ )
+ }
+}
+
+impl Error for DateTimeRangeError {}