Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
jfkthame committed Feb 29, 2024
1 parent ac6370b commit ad43310
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/explicit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
//! <http://www.unicode.org/reports/tr9/#Explicit_Levels_and_Directions>

#[cfg(feature = "smallvec")]
use smallvec::{SmallVec, smallvec};
use smallvec::{smallvec, SmallVec};

use super::char_data::{
is_rtl,
Expand All @@ -37,7 +37,7 @@ pub fn compute<'a, T: TextSource<'a> + ?Sized>(

// <http://www.unicode.org/reports/tr9/#X1>
#[cfg(feature = "smallvec")]
let mut stack: SmallVec::<[Status; 8]> = smallvec![Status {
let mut stack: SmallVec<[Status; 8]> = smallvec![Status {
level: para_level,
status: OverrideStatus::Neutral,
}];
Expand Down
12 changes: 9 additions & 3 deletions src/implicit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,9 @@ pub fn resolve_weak<'a, T: TextSource<'a> + ?Sized>(
}

#[cfg(feature = "smallvec")]
type BracketPairVec = SmallVec::<[BracketPair; 8]>;
type BracketPairVec = SmallVec<[BracketPair; 8]>;
#[cfg(not(feature = "smallvec"))]
type BracketPairVec = Vec::<BracketPair>;
type BracketPairVec = Vec<BracketPair>;

/// 3.3.5 Resolving Neutral Types
///
Expand All @@ -280,7 +280,13 @@ pub fn resolve_neutral<'a, D: BidiDataSource, T: TextSource<'a> + ?Sized>(
// > Identify the bracket pairs in the current isolating run sequence according to BD16.
// We use processing_classes, not original_classes, due to BD14/BD15
let mut bracket_pairs = BracketPairVec::new();
identify_bracket_pairs(text, data_source, sequence, processing_classes, &mut bracket_pairs);
identify_bracket_pairs(
text,
data_source,
sequence,
processing_classes,
&mut bracket_pairs,
);

// > For each bracket-pair element in the list of pairs of text positions
//
Expand Down
4 changes: 2 additions & 2 deletions src/prepare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use alloc::vec::Vec;
use core::cmp::max;
use core::ops::Range;
#[cfg(feature = "smallvec")]
use smallvec::{SmallVec, smallvec};
use smallvec::{smallvec, SmallVec};

use super::level::Level;
use super::BidiClass::{self, *};
Expand Down Expand Up @@ -55,7 +55,7 @@ pub fn isolating_run_sequences(
// When we encounter an isolate initiator, we push the current sequence onto the
// stack so we can resume it after the matching PDI.
#[cfg(feature = "smallvec")]
let mut stack: SmallVec::<[Vec<Range<usize>>; 8]> = smallvec![vec![]];
let mut stack: SmallVec<[Vec<Range<usize>>; 8]> = smallvec![vec![]];
#[cfg(not(feature = "smallvec"))]
let mut stack = vec![vec![]];

Expand Down

0 comments on commit ad43310

Please sign in to comment.