Skip to content

Commit f94a803

Browse files
authored
Update README.md fix regex example (#372)
1 parent 3c7afd7 commit f94a803

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,10 @@ Tests whether the string matches the regex given. `regex` takes
251251
Examples:
252252

253253
```rust
254+
use regex::Regex;
254255
use std::sync::LazyLock;
255256

256-
static RE_TWO_CHARS: Lazy<Regex> = Lazy::new(|| {
257+
static RE_TWO_CHARS: LazyLock<Regex> = LazyLock::new(|| {
257258
Regex::new(r"[a-z]{2}$").unwrap()
258259
});
259260

0 commit comments

Comments
 (0)