File tree 4 files changed +8
-10
lines changed
4 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ regex = "1.0"
24
24
unicode-segmentation = " 1.2"
25
25
percent-encoding = " 2.0"
26
26
time = { version = " 0.3" , default-features = false }
27
- once_cell = " 1.0"
28
27
deunicode = { version = " 1.0.0" , optional = true }
29
28
30
29
[features ]
Original file line number Diff line number Diff line change @@ -30,15 +30,15 @@ impl SlugifyMode {
30
30
}
31
31
}
32
32
33
- static SLUG_INVALID_CHARS_DEFAULT : once_cell :: sync:: Lazy < Regex > =
34
- once_cell :: sync:: Lazy :: new ( || Regex :: new ( r"([^0-9\p{Alphabetic}]+)" ) . unwrap ( ) ) ;
35
- static SLUG_INVALID_CHARS_RAW : once_cell :: sync:: Lazy < Regex > =
36
- once_cell :: sync:: Lazy :: new ( || Regex :: new ( r"([\s]+)" ) . unwrap ( ) ) ;
37
- static SLUG_INVALID_CHARS_PRETTY : once_cell :: sync:: Lazy < Regex > = once_cell :: sync:: Lazy :: new ( || {
33
+ static SLUG_INVALID_CHARS_DEFAULT : std :: sync:: LazyLock < Regex > =
34
+ std :: sync:: LazyLock :: new ( || Regex :: new ( r"([^0-9\p{Alphabetic}]+)" ) . unwrap ( ) ) ;
35
+ static SLUG_INVALID_CHARS_RAW : std :: sync:: LazyLock < Regex > =
36
+ std :: sync:: LazyLock :: new ( || Regex :: new ( r"([\s]+)" ) . unwrap ( ) ) ;
37
+ static SLUG_INVALID_CHARS_PRETTY : std :: sync:: LazyLock < Regex > = std :: sync:: LazyLock :: new ( || {
38
38
Regex :: new ( r"([^\p{Alphabetic}0-9\._\~!\$&'\(\)\+,;=@]+)" ) . unwrap ( )
39
39
} ) ;
40
- static SLUG_INVALID_CHARS_ASCII : once_cell :: sync:: Lazy < Regex > =
41
- once_cell :: sync:: Lazy :: new ( || Regex :: new ( r"([^a-zA-Z0-9]+)" ) . unwrap ( ) ) ;
40
+ static SLUG_INVALID_CHARS_ASCII : std :: sync:: LazyLock < Regex > =
41
+ std :: sync:: LazyLock :: new ( || Regex :: new ( r"([^a-zA-Z0-9]+)" ) . unwrap ( ) ) ;
42
42
43
43
#[ derive( Debug , FilterParameters ) ]
44
44
struct SlugifyArgs {
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ pub struct StripHtml;
110
110
#[ name = "strip_html" ]
111
111
struct StripHtmlFilter ;
112
112
113
- static MATCHERS : once_cell :: sync:: Lazy < [ Regex ; 4 ] > = once_cell :: sync:: Lazy :: new ( || {
113
+ static MATCHERS : std :: sync:: LazyLock < [ Regex ; 4 ] > = std :: sync:: LazyLock :: new ( || {
114
114
[
115
115
Regex :: new ( r"(?is)<script.*?</script>" ) . unwrap ( ) ,
116
116
Regex :: new ( r"(?is)<style.*?</style>" ) . unwrap ( ) ,
You can’t perform that action at this time.
0 commit comments