Skip to content

Commit af2a6f5

Browse files
authored
feat: upgrade deno_ast to 0.51.0 (#1461)
1 parent a9f2816 commit af2a6f5

File tree

7 files changed

+40
-32
lines changed

7 files changed

+40
-32
lines changed

Cargo.lock

Lines changed: 34 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ test = true
2323
default = []
2424

2525
[dependencies]
26-
deno_ast = { version = "0.50.0", features = ["scopes", "transforms", "utils", "visit", "view", "react"] }
26+
deno_ast = { version = "0.51.0", features = ["scopes", "transforms", "utils", "visit", "view", "react"] }
2727
log = "0.4.20"
2828
serde = { version = "1.0.195", features = ["derive"] }
2929
serde_json = "1.0.111"

examples/dlint/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ mod tests {
237237

238238
// TODO(bartlomieju): this code is copy-pasted from `deno/test_util/src/lib.rs`
239239

240-
pub fn strip_ansi_codes(s: &str) -> std::borrow::Cow<str> {
240+
pub fn strip_ansi_codes(s: &str) -> std::borrow::Cow<'_, str> {
241241
console_static_text::ansi::strip_ansi_codes(s)
242242
}
243243

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "1.85.0"
2+
channel = "1.90.0"
33
components = ["clippy", "rustfmt"]

src/diagnostic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ impl Diagnostic for LintDiagnostic {
8585
Cow::Borrowed(&self.details.message)
8686
}
8787

88-
fn location(&self) -> DiagnosticLocation {
88+
fn location(&self) -> DiagnosticLocation<'_> {
8989
match &self.range {
9090
Some(range) => DiagnosticLocation::ModulePosition {
9191
specifier: Cow::Borrowed(&self.specifier),

src/rules/fresh_server_event_handlers.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@ impl Handler for Visitor {
5151
return;
5252
};
5353
let segments = path_segments.collect::<Vec<_>>();
54-
if !segments.iter().any(|comp| *comp == "routes")
55-
|| segments.iter().any(|comp| *comp == "(_islands)")
56-
{
54+
if !segments.contains(&"routes") || segments.contains(&"(_islands)") {
5755
return;
5856
}
5957

src/rules/no_irregular_whitespace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ static IRREGULAR_WHITESPACE: Lazy<Regex> = Lazy::new(|| {
2727
static IRREGULAR_LINE_TERMINATORS: Lazy<Regex> =
2828
Lazy::new(|| Regex::new(r"[\u2028\u2029]").unwrap());
2929

30-
fn test_for_whitespace(value: &str) -> Vec<Matches> {
30+
fn test_for_whitespace(value: &str) -> Vec<Matches<'_, '_>> {
3131
let mut matches_vector: Vec<Matches> = vec![];
3232
if IRREGULAR_WHITESPACE.is_match(value) {
3333
let matches = IRREGULAR_WHITESPACE.find_iter(value);

0 commit comments

Comments
 (0)