File tree 2 files changed +8
-11
lines changed
2 files changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -24,14 +24,13 @@ sxd-document = "0.3"
24
24
sxd-xpath = " 0.4"
25
25
yaml-rust = " 0.4"
26
26
lazy_static = " 1.4"
27
- strum = " 0.26 "
28
- strum_macros = " 0.26 "
27
+ strum = " 0.27.1 "
28
+ strum_macros = " 0.27.1 "
29
29
error-chain = " 0.12.4"
30
30
regex = " 1.10"
31
31
dirs = " 6.0"
32
32
bitflags = " 2.5"
33
33
phf = { version = " 0.11" , features = [" macros" ] }
34
- rand = " 0.8"
35
34
roman-numerals-rs = " 3.1.0"
36
35
radix_fmt = " 1.0"
37
36
unicode-script = " 0.5"
@@ -40,15 +39,13 @@ env_logger = "0.11"
40
39
cfg-if = " 1.0"
41
40
[target .'cfg(target_family = "wasm")' .dependencies ]
42
41
zip = { version = " 2.1" , default-features = false , features = [" deflate" ] }
42
+ fastrand = { version = " 2.3.0" , features = [" js" ] }
43
+
43
44
[target .'cfg(not(target_family = "wasm"))' .dependencies ]
44
45
zip = { version = " 2.1" , default-features = false , features = [" bzip2" ] }
46
+ fastrand = { version = " 2.3.0" }
45
47
46
- [dependencies .getrandom ]
47
- version = " 0.2"
48
- features = [" js" ]
49
-
50
- [target .'cfg(target_os = "android")' .dependencies ]
51
- android_logger = {version = " 0.14.1" , optional = true }
48
+ android_logger = {version = " 0.15.0" , optional = true }
52
49
53
50
# # dependencies because of need to build wasm version for file i/o
54
51
# yew = "0.18.0"
Original file line number Diff line number Diff line change @@ -543,15 +543,15 @@ pub fn errors_to_string(e: &Error) -> String {
543
543
fn add_ids ( mathml : Element ) -> Element {
544
544
use std:: time:: SystemTime ;
545
545
let time = if cfg ! ( target_family = "wasm" ) {
546
- rand :: random :: < usize > ( )
546
+ fastrand :: usize ( .. )
547
547
} else {
548
548
SystemTime :: now ( )
549
549
. duration_since ( SystemTime :: UNIX_EPOCH )
550
550
. unwrap ( )
551
551
. as_millis ( ) as usize
552
552
} ;
553
553
let time_part = radix_fmt:: radix ( time, 36 ) . to_string ( ) ;
554
- let random_part = radix_fmt:: radix ( rand :: random :: < usize > ( ) , 36 ) . to_string ( ) ;
554
+ let random_part = radix_fmt:: radix ( fastrand :: u32 ( .. ) , 36 ) . to_string ( ) ;
555
555
let prefix = "M" . to_string ( ) + & time_part[ time_part. len ( ) - 3 ..] + & random_part[ random_part. len ( ) - 4 ..] + "-" ; // begin with letter
556
556
add_ids_to_all ( mathml, & prefix, 0 ) ;
557
557
return mathml;
You can’t perform that action at this time.
0 commit comments