Skip to content

Commit ed5898e

Browse files
Bump toolchain (#7324)
1.92
1 parent d27387a commit ed5898e

File tree

8 files changed

+17
-37
lines changed

8 files changed

+17
-37
lines changed

components/datetime/src/provider/pattern/mod.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,15 @@ pub use item::{GenericPatternItem, PatternItem};
2828
/// The granularity of time represented in a [`Pattern`](runtime::Pattern).
2929
/// Ordered from least granular to most granular for comparison.
3030
#[derive(
31-
Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, yoke::Yokeable, zerofrom::ZeroFrom,
31+
Default, Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, yoke::Yokeable, zerofrom::ZeroFrom,
3232
)]
3333
#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))]
3434
#[cfg_attr(feature = "datagen", databake(path = icu_datetime::provider::pattern))]
3535
#[cfg_attr(feature = "serde", derive(serde::Deserialize))]
3636
#[non_exhaustive]
3737
pub enum TimeGranularity {
3838
/// No time is in the pattern.
39+
#[default]
3940
None,
4041
/// Smallest time unit = hours.
4142
Hours,
@@ -47,12 +48,6 @@ pub enum TimeGranularity {
4748
Nanoseconds,
4849
}
4950

50-
impl Default for TimeGranularity {
51-
fn default() -> Self {
52-
Self::None
53-
}
54-
}
55-
5651
impl TimeGranularity {
5752
/// Returns [`true`] if the most granular time being displayed will align with
5853
/// the top of the hour, otherwise returns [`false`].

components/experimental/src/dimension/currency/options.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,15 @@ impl From<Width> for CurrencyFormatterOptions {
2323
}
2424
}
2525

26-
#[derive(Debug, Eq, PartialEq, Clone, Copy, Hash)]
26+
#[derive(Default, Debug, Eq, PartialEq, Clone, Copy, Hash)]
2727
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2828
#[non_exhaustive]
2929
pub enum Width {
3030
/// Format the currency with the standard (short) currency symbol.
3131
///
3232
/// For example, 1 USD formats as "$1.00" in en-US and "US$1" in most other locales.
3333
#[cfg_attr(feature = "serde", serde(rename = "short"))]
34+
#[default]
3435
Short,
3536

3637
/// Format the currency with the narrow currency symbol.
@@ -42,9 +43,3 @@ pub enum Width {
4243
#[cfg_attr(feature = "serde", serde(rename = "narrow"))]
4344
Narrow,
4445
}
45-
46-
impl Default for Width {
47-
fn default() -> Self {
48-
Self::Short
49-
}
50-
}

components/experimental/src/dimension/percent/options.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@ impl From<Display> for PercentFormatterOptions {
1919
}
2020
}
2121

22-
#[derive(Debug, Eq, PartialEq, Clone, Copy)]
22+
#[derive(Default, Debug, Eq, PartialEq, Clone, Copy)]
2323
#[non_exhaustive]
2424
pub enum Display {
2525
/// Format the Percent to display with the standard formatting for the locale.
2626
///
2727
/// For example 123 -> 123% in en-US.
28+
#[default]
2829
Standard,
2930
/// Format the Percent to display as an approximate value.
3031
///
@@ -35,9 +36,3 @@ pub enum Display {
3536
/// For example 123 -> +123% in en-US.
3637
ExplicitSign,
3738
}
38-
39-
impl Default for Display {
40-
fn default() -> Self {
41-
Self::Standard
42-
}
43-
}

components/pattern/src/parser/mod.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,15 @@ use core::{fmt::Debug, marker::PhantomData, str::FromStr};
1010
pub use error::ParserError;
1111
pub use token::ParsedPatternItem;
1212

13-
#[derive(PartialEq, Debug)]
13+
#[derive(PartialEq, Debug, Default)]
1414
enum ParserState {
15+
#[default]
1516
Default,
1617
Placeholder,
1718
QuotedLiteral,
18-
Apostrophe { quoted: bool },
19-
}
20-
21-
impl Default for ParserState {
22-
fn default() -> Self {
23-
Self::Default
24-
}
19+
Apostrophe {
20+
quoted: bool,
21+
},
2522
}
2623

2724
macro_rules! handle_literal {

provider/core/src/request.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ impl DataMarkerAttributes {
331331
///
332332
/// Panics if the string contains characters other than `[a-zA-Z0-9_\-]`.
333333
pub const fn from_str_or_panic(s: &str) -> &Self {
334+
#[allow(clippy::panic)] // documented
334335
let Ok(r) = Self::try_from_str(s) else {
335336
panic!("Invalid marker attribute syntax")
336337
};

provider/fs/src/export/fs_exporter.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,17 @@ use std::path::PathBuf;
1515

1616
/// Choices of what to do if [`FilesystemExporter`] tries to write to a pre-existing directory.
1717
#[non_exhaustive]
18-
#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)]
18+
#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1919
pub enum OverwriteOption {
2020
/// If the directory doesn't exist, create it.
2121
/// If it does exist, remove it safely (`rmdir`) and re-create it.
22+
#[default]
2223
CheckEmpty,
2324
/// If the directory doesn't exist, create it.
2425
/// If it does exist, remove it aggressively (`rm -rf`) and re-create it.
2526
RemoveAndReplace,
2627
}
2728

28-
impl Default for OverwriteOption {
29-
fn default() -> Self {
30-
Self::CheckEmpty
31-
}
32-
}
33-
3429
/// Options bag for initializing a [`FilesystemExporter`].
3530
#[non_exhaustive]
3631
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
44

55
[toolchain]
6-
channel = "1.90"
6+
channel = "1.92"

utils/zerotrie/src/builder/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@
149149
//! assert_eq!(TRIE.get(b"unknown"), None);
150150
//! ```
151151
152+
#![allow(clippy::panic)]
153+
152154
mod branch_meta;
153155
pub(crate) mod bytestr;
154156
#[cfg(all(feature = "alloc", feature = "dense"))]

0 commit comments

Comments
 (0)