diff --git a/src/explicit.rs b/src/explicit.rs index 784ce8d..3c98bf4 100644 --- a/src/explicit.rs +++ b/src/explicit.rs @@ -12,7 +12,7 @@ //! #[cfg(feature = "smallvec")] -use smallvec::{SmallVec, smallvec}; +use smallvec::{smallvec, SmallVec}; use super::char_data::{ is_rtl, @@ -37,7 +37,7 @@ pub fn compute<'a, T: TextSource<'a> + ?Sized>( // #[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, }]; diff --git a/src/implicit.rs b/src/implicit.rs index c0cfc13..334afec 100644 --- a/src/implicit.rs +++ b/src/implicit.rs @@ -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::; +type BracketPairVec = Vec; /// 3.3.5 Resolving Neutral Types /// @@ -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 // diff --git a/src/prepare.rs b/src/prepare.rs index 0dd3ece..f864229 100644 --- a/src/prepare.rs +++ b/src/prepare.rs @@ -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, *}; @@ -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>; 8]> = smallvec![vec![]]; + let mut stack: SmallVec<[Vec>; 8]> = smallvec![vec![]]; #[cfg(not(feature = "smallvec"))] let mut stack = vec![vec![]];