aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-05-07 18:54:33 +0100
committerAleksey Kladov <[email protected]>2019-05-07 18:54:33 +0100
commit1667b5cf52a8f2854c7299242820c951eab50f7a (patch)
treed7dee875aad8182a83195dba6d767d26dcff53d3 /crates/ra_assists/src
parent70cd5ffbf5f2283fc4986c581d225987620b5335 (diff)
switch to once_cell from lazy_static
Diffstat (limited to 'crates/ra_assists/src')
-rw-r--r--crates/ra_assists/src/ast_editor.rs6
1 files changed, 2 insertions, 4 deletions
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<N: AstNode>(text: &str) -> TreeArc<N> {
289} 289}
290 290
291mod tokens { 291mod tokens {
292 use lazy_static::lazy_static; 292 use once_cell::sync::Lazy;
293 use ra_syntax::{AstNode, SourceFile, TreeArc, SyntaxToken, SyntaxKind::*}; 293 use ra_syntax::{AstNode, SourceFile, TreeArc, SyntaxToken, SyntaxKind::*};
294 294
295 lazy_static! { 295 static SOURCE_FILE: Lazy<TreeArc<SourceFile>> = Lazy::new(|| SourceFile::parse(",\n; ;"));
296 static ref SOURCE_FILE: TreeArc<SourceFile> = SourceFile::parse(",\n; ;");
297 }
298 296
299 pub(crate) fn comma() -> SyntaxToken<'static> { 297 pub(crate) fn comma() -> SyntaxToken<'static> {
300 SOURCE_FILE 298 SOURCE_FILE