We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a620a6 commit d3df915Copy full SHA for d3df915
src/explicit.rs
@@ -11,6 +11,9 @@
11
//!
12
//! <http://www.unicode.org/reports/tr9/#Explicit_Levels_and_Directions>
13
14
+#[cfg(feature = "smallvec")]
15
+use smallvec::{SmallVec, smallvec};
16
+
17
use super::char_data::{
18
is_rtl,
19
BidiClass::{self, *},
@@ -33,6 +36,12 @@ pub fn compute<'a, T: TextSource<'a> + ?Sized>(
33
36
assert_eq!(text.len(), original_classes.len());
34
37
35
38
// <http://www.unicode.org/reports/tr9/#X1>
39
+ #[cfg(feature = "smallvec")]
40
+ let mut stack: SmallVec::<[Status; 8]> = smallvec![Status {
41
+ level: para_level,
42
+ status: OverrideStatus::Neutral,
43
+ }];
44
+ #[cfg(not(feature = "smallvec"))]
45
let mut stack = vec![Status {
46
level: para_level,
47
status: OverrideStatus::Neutral,
0 commit comments