|
309 | 309 | //! ``` |
310 | 310 |
|
311 | 311 | use controlled_option::ControlledOption; |
312 | | -use lazy_static::lazy_static; |
313 | 312 | use lsp_positions::SpanCalculator; |
| 313 | +use once_cell::sync::Lazy; |
314 | 314 | use stack_graphs::arena::Handle; |
315 | 315 | use stack_graphs::graph::File; |
316 | 316 | use stack_graphs::graph::Node; |
@@ -368,19 +368,16 @@ static SYMBOL_ATTR: &'static str = "symbol"; |
368 | 368 | static TYPE_ATTR: &'static str = "type"; |
369 | 369 |
|
370 | 370 | // Expected attributes per node type |
371 | | -lazy_static! { |
372 | | - static ref DROP_SCOPES_ATTRS: HashSet<&'static str> = HashSet::from([TYPE_ATTR]); |
373 | | - static ref POP_SCOPED_SYMBOL_ATTRS: HashSet<&'static str> = |
374 | | - HashSet::from([TYPE_ATTR, SYMBOL_ATTR, IS_DEFINITION_ATTR]); |
375 | | - static ref POP_SYMBOL_ATTRS: HashSet<&'static str> = |
376 | | - HashSet::from([TYPE_ATTR, SYMBOL_ATTR, IS_DEFINITION_ATTR]); |
377 | | - static ref PUSH_SCOPED_SYMBOL_ATTRS: HashSet<&'static str> = |
378 | | - HashSet::from([TYPE_ATTR, SYMBOL_ATTR, SCOPE_ATTR, IS_REFERENCE_ATTR]); |
379 | | - static ref PUSH_SYMBOL_ATTRS: HashSet<&'static str> = |
380 | | - HashSet::from([TYPE_ATTR, SYMBOL_ATTR, IS_REFERENCE_ATTR]); |
381 | | - static ref SCOPE_ATTRS: HashSet<&'static str> = |
382 | | - HashSet::from([TYPE_ATTR, IS_EXPORTED_ATTR, IS_ENDPOINT_ATTR]); |
383 | | -} |
| 371 | +static POP_SCOPED_SYMBOL_ATTRS: Lazy<HashSet<&'static str>> = |
| 372 | + Lazy::new(|| HashSet::from([TYPE_ATTR, SYMBOL_ATTR, IS_DEFINITION_ATTR])); |
| 373 | +static POP_SYMBOL_ATTRS: Lazy<HashSet<&'static str>> = |
| 374 | + Lazy::new(|| HashSet::from([TYPE_ATTR, SYMBOL_ATTR, IS_DEFINITION_ATTR])); |
| 375 | +static PUSH_SCOPED_SYMBOL_ATTRS: Lazy<HashSet<&'static str>> = |
| 376 | + Lazy::new(|| HashSet::from([TYPE_ATTR, SYMBOL_ATTR, SCOPE_ATTR, IS_REFERENCE_ATTR])); |
| 377 | +static PUSH_SYMBOL_ATTRS: Lazy<HashSet<&'static str>> = |
| 378 | + Lazy::new(|| HashSet::from([TYPE_ATTR, SYMBOL_ATTR, IS_REFERENCE_ATTR])); |
| 379 | +static SCOPE_ATTRS: Lazy<HashSet<&'static str>> = |
| 380 | + Lazy::new(|| HashSet::from([TYPE_ATTR, IS_EXPORTED_ATTR, IS_ENDPOINT_ATTR])); |
384 | 381 |
|
385 | 382 | // Edge attribute names |
386 | 383 | static PRECEDENCE_ATTR: &'static str = "precedence"; |
|
0 commit comments