Skip to content

Commit

Permalink
Remove Clone from Cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Westerlind committed Sep 7, 2018
1 parent ece369b commit 320a145
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/dfa.rs
Expand Up @@ -88,7 +88,7 @@ pub fn can_exec(insts: &Program) -> bool {
/// This cache is reused between multiple invocations of the same regex
/// program. (It is not shared simultaneously between threads. If there is
/// contention, then new caches are created.)
#[derive(Clone, Debug)]
#[derive(Debug)]
pub struct Cache {
/// Group persistent DFA related cache state together. The sparse sets
/// listed below are used as scratch space while computing uncached states.
Expand All @@ -107,7 +107,7 @@ pub struct Cache {
/// `CacheInner` is logically just a part of Cache, but groups together fields
/// that aren't passed as function parameters throughout search. (This split
/// is mostly an artifact of the borrow checker. It is happily paid.)
#[derive(Clone, Debug)]
#[derive(Debug)]
struct CacheInner {
/// A cache of pre-compiled DFA states, keyed by the set of NFA states
/// and the set of empty-width flags set at the byte in the input when the
Expand Down
2 changes: 1 addition & 1 deletion src/exec.rs
Expand Up @@ -1271,7 +1271,7 @@ enum MatchNfaType {
/// available to a particular program.
pub type ProgramCache = RefCell<ProgramCacheInner>;

#[derive(Clone, Debug)]
#[derive(Debug)]
pub struct ProgramCacheInner {
pub pikevm: pikevm::Cache,
pub backtrack: backtrack::Cache,
Expand Down

0 comments on commit 320a145

Please sign in to comment.