From 1667b5cf52a8f2854c7299242820c951eab50f7a Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 7 May 2019 20:54:33 +0300 Subject: switch to once_cell from lazy_static --- crates/ra_assists/src/ast_editor.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'crates/ra_assists/src') diff --git a/crates/ra_assists/src/ast_editor.rs b/crates/ra_assists/src/ast_editor.rs index 726e5c0a3..aa7aeaabb 100644 --- a/crates/ra_assists/src/ast_editor.rs +++ b/crates/ra_assists/src/ast_editor.rs @@ -289,12 +289,10 @@ fn ast_node_from_file_text(text: &str) -> TreeArc { } mod tokens { - use lazy_static::lazy_static; + use once_cell::sync::Lazy; use ra_syntax::{AstNode, SourceFile, TreeArc, SyntaxToken, SyntaxKind::*}; - lazy_static! { - static ref SOURCE_FILE: TreeArc = SourceFile::parse(",\n; ;"); - } + static SOURCE_FILE: Lazy> = Lazy::new(|| SourceFile::parse(",\n; ;")); pub(crate) fn comma() -> SyntaxToken<'static> { SOURCE_FILE -- cgit v1.2.3