diff --git a/Cargo.lock b/Cargo.lock index 987671f8..f9ee5c54 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -263,9 +263,9 @@ checksum = "5c297a1c74b71ae29df00c3e22dd9534821d60eb9af5a0192823fa2acea70c2a" [[package]] name = "deno_ast" -version = "0.42.0" +version = "0.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b08d11d9e4086b00d3428650e31153cf5896586411763cb88a6423ce5b18791" +checksum = "d6a41d70fa043b4117c6fea30fdcf2dfee7053363a3cdb45011673ebdb3300d5" dependencies = [ "deno_media_type", "deno_terminal", @@ -322,9 +322,9 @@ dependencies = [ [[package]] name = "deno_media_type" -version = "0.1.4" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8978229b82552bf8457a0125aa20863f023619cfc21ebb007b1e571d68fd85b" +checksum = "7fcf552fbdedbe81c89705349d7d2485c7051382b000dfddbdbf7fc25931cf83" dependencies = [ "data-url", "serde", diff --git a/Cargo.toml b/Cargo.toml index f6507afb..bd80244c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,7 @@ default = [] docs = [] [dependencies] -deno_ast = { version = "0.42.0", features = ["scopes", "transforms", "utils", "visit", "view", "react"] } +deno_ast = { version = "0.43.0", features = ["scopes", "transforms", "utils", "visit", "view", "react"] } log = "0.4.20" serde = { version = "1.0.195", features = ["derive"] } serde_json = "1.0.111" diff --git a/src/rules/prefer_const.rs b/src/rules/prefer_const.rs index a251579b..ef22bc23 100644 --- a/src/rules/prefer_const.rs +++ b/src/rules/prefer_const.rs @@ -1091,7 +1091,7 @@ mod variable_collector_tests { fn collect(src: &str) -> VariableCollector { let parsed_source = test_util::parse(src); let mut v = VariableCollector::new(); - v.visit_program(parsed_source.program_ref()); + parsed_source.program_ref().visit_with(&mut v); v }