let's try this

This commit is contained in:
mehbark 2023-06-13 22:22:53 -04:00
parent 44d6b01ebe
commit 6a39bf6bac

View file

@ -475,6 +475,7 @@ fn could_match(vars: Option<&[Symbol]>, lhs: &Sexp, expr: &Sexp) -> bool {
// type Matches<'src> = HashMap<Symbol, HashSet<&'src Sexp>>; // type Matches<'src> = HashMap<Symbol, HashSet<&'src Sexp>>;
// TODO: there. can. be. at most. one. match.
// i'm happy that this is faster, but it might be worth going back to the per-variable thing // i'm happy that this is faster, but it might be worth going back to the per-variable thing
fn matches<'src>(vars: &HashSet<Symbol>, lhs: &Sexp, expr: &'src Sexp) -> HashSet<&'src Sexp> { fn matches<'src>(vars: &HashSet<Symbol>, lhs: &Sexp, expr: &'src Sexp) -> HashSet<&'src Sexp> {
match (lhs, expr) { match (lhs, expr) {