Skip to content

Commit

Permalink
chore: Remove now unused once_cell dependency (#614)
Browse files Browse the repository at this point in the history
Rust 1.70 includes the now-stable version in the standard library, so
let's use that.
  • Loading branch information
Xanewok authored Oct 23, 2023
1 parent f17c0f8 commit 1d992d4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ markdown = { version = "0.3.0" }
napi = { version = "2.13.1", features = ["compat-mode", "napi8", "serde-json"] }
napi-build = { version = "2.0.1" }
napi-derive = { version = "2.13.0" }
once_cell = { version = "1.8.0" }
owo-colors = { version = "3.5.0", features = ["supports-colors"] }
proc-macro2 = { version = "1.0.53" }
quote = { version = "1.0.26" }
Expand Down
13 changes: 4 additions & 9 deletions crates/codegen/grammar/src/dsl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,23 +174,18 @@ macro_rules! slang_grammar_lexical_context {
#[macro_export]
macro_rules! slang_grammar_definition {
($context:ident $trait:ident $trait_ref:ident $node_type:ident $dsl_macro:ident $is_inline:tt $name:ident $value:tt) => {
#[derive(Debug)]
#[derive(Debug, Default)]
struct $name {
node: once_cell::unsync::OnceCell<$crate::$node_type>,
node: ::std::cell::OnceCell<$crate::$node_type>,
}

impl $name {
const SOURCE_LOCATION: $crate::SourceLocation = slang_location!();
const NAME: &str = stringify!($name);
const INSTANCE: once_cell::unsync::OnceCell<std::rc::Rc<Self>> =
once_cell::unsync::OnceCell::new();
const INSTANCE: ::std::cell::OnceCell<std::rc::Rc<Self>> = ::std::cell::OnceCell::new();
fn instance() -> $crate::$trait_ref {
Self::INSTANCE
.get_or_init(|| {
std::rc::Rc::new(Self {
node: once_cell::unsync::OnceCell::new(),
})
})
.get_or_init(::std::default::Default::default)
.clone()
}
}
Expand Down
1 change: 0 additions & 1 deletion crates/solidity/inputs/language/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ codegen_grammar = { workspace = true }
codegen_language_definition = { workspace = true }
codegen_language_macros = { workspace = true }
codegen_schema = { workspace = true }
once_cell = { workspace = true }
semver = { workspace = true }

0 comments on commit 1d992d4

Please sign in to comment.