Skip to content

Commit 23e60c1

Browse files
committed
Auto merge of #14073 - lnicola:zip, r=lnicola
minor: Bump `zip` to avoid `time-macros` This fixes the compile time regression in #13876 and sneaks in two typo fixes spotted by `@cuishuang` (sorry for not preserving the commit attribution, but it's a little hard to manage it across repositories).
2 parents 7acc434 + ff340f9 commit 23e60c1

File tree

5 files changed

+13
-17
lines changed

5 files changed

+13
-17
lines changed

Cargo.lock

Lines changed: 3 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/proc-macro-api/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ impl MacroDylib {
7171

7272
/// A handle to a specific macro (a `#[proc_macro]` annotated function).
7373
///
74-
/// It exists withing a context of a specific [`ProcMacroProcess`] -- currently
74+
/// It exists within a context of a specific [`ProcMacroProcess`] -- currently
7575
/// we share a single expander process for all macros.
7676
#[derive(Debug, Clone)]
7777
pub struct ProcMacro {

crates/profile/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub use countme::Count;
2626

2727
thread_local!(static IN_SCOPE: RefCell<bool> = RefCell::new(false));
2828

29-
/// Allows to check if the current code is withing some dynamic scope, can be
29+
/// Allows to check if the current code is within some dynamic scope, can be
3030
/// useful during debugging to figure out why a function is called.
3131
pub struct Scope {
3232
prev: bool,

xtask/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ flate2 = "1.0.24"
1212
write-json = "0.1.2"
1313
xshell = "0.2.2"
1414
xflags = "0.3.0"
15+
time = { version = "0.3", default-features = false }
1516
zip = { version = "0.6", default-features = false, features = ["deflate", "time"] }
1617
# Avoid adding more dependencies to this crate

xtask/src/dist.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use std::{
66
};
77

88
use flate2::{write::GzEncoder, Compression};
9+
use time::OffsetDateTime;
910
use xshell::{cmd, Shell};
1011
use zip::{write::FileOptions, DateTime, ZipWriter};
1112

@@ -112,7 +113,8 @@ fn zip(src_path: &Path, symbols_path: Option<&PathBuf>, dest_path: &Path) -> any
112113
src_path.file_name().unwrap().to_str().unwrap(),
113114
FileOptions::default()
114115
.last_modified_time(
115-
DateTime::from_time(std::fs::metadata(src_path)?.modified()?.into()).unwrap(),
116+
DateTime::try_from(OffsetDateTime::from(std::fs::metadata(src_path)?.modified()?))
117+
.unwrap(),
116118
)
117119
.unix_permissions(0o755)
118120
.compression_method(zip::CompressionMethod::Deflated)
@@ -125,7 +127,10 @@ fn zip(src_path: &Path, symbols_path: Option<&PathBuf>, dest_path: &Path) -> any
125127
symbols_path.file_name().unwrap().to_str().unwrap(),
126128
FileOptions::default()
127129
.last_modified_time(
128-
DateTime::from_time(std::fs::metadata(src_path)?.modified()?.into()).unwrap(),
130+
DateTime::try_from(OffsetDateTime::from(
131+
std::fs::metadata(src_path)?.modified()?,
132+
))
133+
.unwrap(),
129134
)
130135
.compression_method(zip::CompressionMethod::Deflated)
131136
.compression_level(Some(9)),

0 commit comments

Comments
 (0)