Skip to content

Commit

Permalink
Use LazyLock (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
lambda-fairy authored Jun 20, 2022
1 parent 5aa543a commit f43d47d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/src/page.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use comrak::{
nodes::{AstNode, NodeHeading, NodeValue},
Arena, ComrakOptions,
};
use std::{fs, io, lazy::SyncLazy, path::Path};
use std::{fs, io, path::Path, sync::LazyLock};

pub struct Page<'a> {
pub title: Option<&'a AstNode<'a>>,
Expand All @@ -29,7 +29,7 @@ impl<'a> Page<'a> {
}
}

pub static COMRAK_OPTIONS: SyncLazy<ComrakOptions> = SyncLazy::new(|| {
pub static COMRAK_OPTIONS: LazyLock<ComrakOptions> = LazyLock::new(|| {
let mut options = ComrakOptions::default();
options.extension.header_ids = Some("".to_string());
options.render.unsafe_ = true;
Expand Down

0 comments on commit f43d47d

Please sign in to comment.