Skip to content

Commit

Permalink
deps: switch from arrayvec to smallvec
Browse files Browse the repository at this point in the history
  • Loading branch information
kartva committed Aug 19, 2024
1 parent a16a7d0 commit d1eab88
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion components/experimental/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ icu_normalizer = { workspace = true }
icu_plurals = { workspace = true }
icu_properties = { workspace = true }

arrayvec = { workspace = true, default-features = false }
databake = { workspace = true, optional = true, features = ["derive"] }
either = { workspace = true }
fixed_decimal = { workspace = true }
Expand Down
6 changes: 3 additions & 3 deletions components/experimental/src/duration/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
use super::{options::*, Duration, DurationFormatter, DurationSign};

use super::validated_options::Unit;
use arrayvec::ArrayVec;
use core::fmt;
use core::fmt::Write;
use either::Either;
use fixed_decimal::{FixedDecimal, SignDisplay};
use icu_decimal::FormattedFixedDecimal;
use smallvec::SmallVec;
use writeable::{adapters::WithPart, PartsWrite, Writeable};

macro_rules! create_unit_parts {
Expand Down Expand Up @@ -452,7 +452,7 @@ impl<'a> FormattedDuration<'a> {
// We can have a maximum of 9 writeables (one FormattedUnit for each unit).
// In the digital case, one or more unit is represented by the FormattedDigitalDuration,
// which is a single writeable.
let mut parts_list: ArrayVec<_, 9> = ArrayVec::new();
let mut parts_list: SmallVec<[HeterogenousToFormatter; 9]> = SmallVec::new();

// 2. Let signDisplayed be true.
let mut sign_displayed = true;
Expand Down Expand Up @@ -565,7 +565,7 @@ impl<'a> FormattedDuration<'a> {
/// Given a partitioned part list of formatted duration parts, it creates and returns a List with all the corresponding parts according to the effective locale and the formatting options of durationFormat.
fn list_format_parts<V: PartsWrite + ?Sized, const CAP: usize>(
&self,
parts_list: ArrayVec<HeterogenousToFormatter, CAP>,
parts_list: SmallVec<[HeterogenousToFormatter; CAP]>,
sink: &mut V,
) -> fmt::Result {
// 1. Let lfOpts be OrdinaryObjectCreate(null).
Expand Down
1 change: 0 additions & 1 deletion tools/make/depcheck/src/allowlist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ pub const EXTRA_DATA_DEPS: &[&str] = &[
///
/// Keep in sync with Cargo.toml crates.io dependencies.
pub const EXTRA_EXPERIMENTAL_DEPS: &[&str] = &[
"arrayvec",
"icu_experimental",
"icu_pattern",
"num-bigint",
Expand Down

0 comments on commit d1eab88

Please sign in to comment.