Skip to content

Commit

Permalink
build(common): Remove dependency on string-cache (#8291)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed Nov 15, 2023
1 parent 9961784 commit 66a4d37
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 19 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.

2 changes: 1 addition & 1 deletion crates/swc_bundler/src/bundler/load.rs
Expand Up @@ -411,7 +411,7 @@ pub(crate) struct Source {
pub local_ctxt: SyntaxContext,
pub export_ctxt: SyntaxContext,

// Clone is relatively cheap, thanks to string_cache.
// Clone is relatively cheap, thanks to hstr.
pub src: Str,
}

Expand Down
1 change: 0 additions & 1 deletion crates/swc_common/Cargo.toml
Expand Up @@ -57,7 +57,6 @@ rustc-hash = "1.1.0"
serde = { version = "1.0.119", features = ["derive"] }
siphasher = "0.3.9"
sourcemap = { version = "6", optional = true }
string_cache = "0.8.7"
termcolor = { version = "1.0", optional = true }
tracing = "0.1.37"
unicode-width = "0.1.4"
Expand Down
17 changes: 1 addition & 16 deletions crates/swc_common/src/eq.rs
@@ -1,7 +1,6 @@
use std::{cell::RefCell, cmp::PartialEq, rc::Rc, sync::Arc};
use std::{cell::RefCell, rc::Rc, sync::Arc};

use num_bigint::BigInt;
use string_cache::Atom;

use crate::{BytePos, Span, SyntaxContext};

Expand Down Expand Up @@ -136,20 +135,6 @@ eq!(isize, i8, i16, i32, i64, i128);
eq!(f32, f64);
eq!(char, str, String);

impl<S: PartialEq> EqIgnoreSpan for Atom<S> {
#[inline]
fn eq_ignore_span(&self, other: &Self) -> bool {
self == other
}
}

impl<S: PartialEq> TypeEq for Atom<S> {
#[inline]
fn type_eq(&self, other: &Self) -> bool {
self == other
}
}

macro_rules! deref {
($T:ident) => {
impl<N> EqIgnoreSpan for $T<N>
Expand Down

0 comments on commit 66a4d37

Please sign in to comment.