From f43d47d135945f2e2d0f8c88ad6c9de3b2ab170e Mon Sep 17 00:00:00 2001 From: Chris Wong Date: Mon, 20 Jun 2022 19:55:37 +0800 Subject: [PATCH] Use LazyLock (#346) --- docs/src/page.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/page.rs b/docs/src/page.rs index baf03135..8c2c9cc2 100644 --- a/docs/src/page.rs +++ b/docs/src/page.rs @@ -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>>, @@ -29,7 +29,7 @@ impl<'a> Page<'a> { } } -pub static COMRAK_OPTIONS: SyncLazy = SyncLazy::new(|| { +pub static COMRAK_OPTIONS: LazyLock = LazyLock::new(|| { let mut options = ComrakOptions::default(); options.extension.header_ids = Some("".to_string()); options.render.unsafe_ = true;