Skip to content

Commit 087343d

Browse files
Bump toolchain to 1.86 (#6412)
1 parent f028b9a commit 087343d

File tree

19 files changed

+48
-51
lines changed

19 files changed

+48
-51
lines changed

components/collator/src/elements.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1968,7 +1968,7 @@ where
19681968

19691969
// Set the exponent. 4 pairs->132, 5 pairs->133, ..., 127 pairs->255.
19701970
let mut len = head.len();
1971-
let num_pairs = (len as u32 + 1) / 2; // as u32 OK, because capped to 254
1971+
let num_pairs = (len as u32).div_ceil(2); // as u32 OK, because capped to 254
19721972
let mut primary =
19731973
numeric_primary | ((132 - 4 + num_pairs) << 16);
19741974
// Find the length without trailing 00 pairs.

components/datetime/src/provider/skeleton/helpers.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ fn naively_apply_time_zone_name(
129129
/// * `length_patterns` - Contains information on how to combine date and time patterns.
130130
/// * `fields` - The desired fields to match against.
131131
/// * `prefer_matched_pattern` - This algorithm does some extra steps of trying to respect
132-
/// the desired fields, even if the provider data doesn't completely match. This
133-
/// configuration option makes it so that the final pattern won't have additional work
134-
/// done to mutate it to match the fields. It will prefer the actual matched pattern.
132+
/// the desired fields, even if the provider data doesn't completely match. This
133+
/// configuration option makes it so that the final pattern won't have additional work
134+
/// done to mutate it to match the fields. It will prefer the actual matched pattern.
135135
pub fn create_best_pattern_for_fields<'data>(
136136
skeletons: &DateSkeletonPatterns<'data>,
137137
length_patterns: &GenericLengthPatterns<'data>,
@@ -375,9 +375,9 @@ fn apply_subseconds(pattern: &mut runtime::Pattern, subseconds: Option<Subsecond
375375
/// * Compute a score based on the best possible match for the given fields.
376376
/// * Select the skeleton with highest score.
377377
/// * Modify the resulting pattern to have fields of the same length. For example requesting
378-
/// a skeleton "yMMMMd" can have a best match of ["yMMMd", "d MMM y"]. This pattern should
379-
/// then be modified to use the requested length to produce a pattern "d MMMM y".
380-
/// However, fields should not be changed from numeric to text.
378+
/// a skeleton "yMMMMd" can have a best match of ["yMMMd", "d MMM y"]. This pattern should
379+
/// then be modified to use the requested length to produce a pattern "d MMMM y".
380+
/// However, fields should not be changed from numeric to text.
381381
///
382382
/// The following is not implemented:
383383
///

components/experimental/src/duration/provider.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ icu_provider::data_marker!(
2020
#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))]
2121
#[cfg_attr(feature = "datagen", databake(path = icu_experimental::duration::provider))]
2222
#[cfg_attr(feature = "serde", derive(serde::Deserialize))]
23-
2423
/// A struct containing digital duration data (durationUnit-type-* patterns).
2524
pub struct DigitalDurationData<'data> {
2625
/// The separator between the hour, minute, and second fields.

components/experimental/src/personnames/specifications/pattern_regex_selector.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,7 @@ impl PersonNamePattern<'_> {
5454
}
5555
});
5656
let missing_fields = self.name_fields.iter().fold(0, |count, (name_field, _)| {
57-
if available_name_fields
58-
.iter()
59-
.any(|&field| field == name_field)
60-
{
57+
if available_name_fields.contains(&name_field) {
6158
count
6259
} else {
6360
count + 1

components/experimental/src/transliterate/transliterator/hardcoded.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ impl HexTransliterator {
5151

5252
let c_u32 = c as u32;
5353
// rounding-up division by 4
54-
let length = (u32::BITS - c_u32.leading_zeros() + 3) / 4;
54+
let length = (u32::BITS - c_u32.leading_zeros()).div_ceil(4);
5555
let padding = self.min_length.saturating_sub(length as u8);
5656
dest.apply_size_hint(
5757
self.prefix.len() + padding as usize + length as usize + self.suffix.len(),

components/experimental/src/transliterate/transliterator/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -515,9 +515,9 @@ impl Transliterator {
515515

516516
impl RuleBasedTransliterator<'_> {
517517
/// Transliteration using rules works as follows:
518-
/// 1. Split the input modifiable range of the Replaceable according into runs according to self.filter
519-
/// 2. Transliterate each run in sequence
520-
/// i. Transliterate the first id_group, then the first rule_group, then the second id_group, etc.
518+
/// 1. Split the input modifiable range of the Replaceable according into runs according to self.filter
519+
/// 2. Transliterate each run in sequence
520+
/// 1. Transliterate the first id_group, then the first rule_group, then the second id_group, etc.
521521
fn transliterate(&self, mut rep: Replaceable, env: &Env) {
522522
// assumes the cursor is at the right position.
523523

components/icu/README.md

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

components/icu/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,11 @@
9999
//! functionality are compiled. These features are:
100100
//!
101101
//! - `compiled_data` (default): Whether to include compiled data. Without this flag, only constructors with
102-
//! explicit `provider` arguments are available.
102+
//! explicit `provider` arguments are available.
103103
//! - `datagen`: Whether to implement functionality that is only required during data generation.
104104
//! - `logging`: Enables logging through the `log` crate.
105105
//! - `serde`: Activates `serde` implementations for core library types, such as [`Locale`], as well
106-
//! as `*_with_buffer_provider` constructors for runtime data management.
106+
//! as `*_with_buffer_provider` constructors for runtime data management.
107107
//! - `sync`: makes most ICU4X objects implement `Send + Sync`. Has a small performance impact when used with runtime data.
108108
//!
109109
//! # Experimental modules

components/locale_core/src/subtags/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//! * [`Script`] is an optional field representing the written script used by the locale.
1111
//! * [`Region`] is the region used by the locale.
1212
//! * [`Variants`] is a list of optional [`Variant`] subtags containing information about the
13-
//! variant adjustments used by the locale.
13+
//! variant adjustments used by the locale.
1414
//!
1515
//! Subtags can be used in isolation, and all basic operations such as parsing, syntax normalization
1616
//! and serialization are supported on each individual subtag, but most commonly

components/normalizer/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2753,7 +2753,7 @@ impl write16::Write16 for IsNormalizedSinkUtf16<'_> {
27532753
// an indexing failure would be a code bug rather than
27542754
// an input or data issue.
27552755
#[allow(clippy::indexing_slicing)]
2756-
if s.as_ptr() == self.expect.as_ptr() {
2756+
if core::ptr::eq(s.as_ptr(), self.expect.as_ptr()) {
27572757
self.expect = &self.expect[s.len()..];
27582758
Ok(())
27592759
} else {
@@ -2795,7 +2795,7 @@ impl core::fmt::Write for IsNormalizedSinkUtf8<'_> {
27952795
// an indexing failure would be a code bug rather than
27962796
// an input or data issue.
27972797
#[allow(clippy::indexing_slicing)]
2798-
if s.as_ptr() == self.expect.as_ptr() {
2798+
if core::ptr::eq(s.as_ptr(), self.expect.as_ptr()) {
27992799
self.expect = &self.expect[s.len()..];
28002800
Ok(())
28012801
} else {
@@ -2834,7 +2834,7 @@ impl core::fmt::Write for IsNormalizedSinkStr<'_> {
28342834
// an indexing failure would be a code bug rather than
28352835
// an input or data issue.
28362836
#[allow(clippy::indexing_slicing)]
2837-
if s.as_ptr() == self.expect.as_ptr() {
2837+
if core::ptr::eq(s.as_ptr(), self.expect.as_ptr()) {
28382838
self.expect = &self.expect[s.len()..];
28392839
Ok(())
28402840
} else {

0 commit comments

Comments
 (0)