Skip to content

Commit 8f0fb9e

Browse files
authored
chore: rust 2024 (#224)
* chore: rust 2024 * chore: rust 2024 * fixes * fixes * fixes * fixes * fixes * fixes * fixes * fix: format * fix: toolchain * regen * more fixes * more fixes * more fixes * more fixes * more fixes * more fixes * fix * more fixes * more fixes * fix: config
1 parent 2ed3129 commit 8f0fb9e

File tree

121 files changed

+545
-474
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+545
-474
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ resolver = "2"
55
[workspace.package]
66
authors = ["Supabase Communnity"]
77
categories = ["development-tools", "postgres", "supabase"]
8-
edition = "2021"
8+
edition = "2024"
99
homepage = "https://supabase.com/"
1010
keywords = ["linter", "typechecker", "postgres", "language-server"]
1111
license = "MIT"
1212
repository = "https://github.com/supabase-community/postgres_lsp"
13-
rust-version = "1.82.0"
13+
rust-version = "1.85.0"
1414

1515
[workspace.dependencies]
1616
# supporting crates unrelated to postgres
@@ -31,7 +31,7 @@ quote = "1.0.33"
3131
rayon = "1.10.0"
3232
regex = "1.11.1"
3333
rustc-hash = "2.0.0"
34-
schemars = { version = "0.8.21", features = ["indexmap2", "smallvec"] }
34+
schemars = { version = "0.8.22", features = ["indexmap2", "smallvec"] }
3535
serde = "1.0.195"
3636
serde_json = "1.0.114"
3737
similar = "2.6.0"

crates/pglt_analyse/src/categories.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use enumflags2::{bitflags, BitFlags};
1+
use enumflags2::{BitFlags, bitflags};
22
use std::borrow::Cow;
33

44
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
@@ -288,8 +288,8 @@ impl schemars::JsonSchema for RuleCategories {
288288
String::from("RuleCategories")
289289
}
290290

291-
fn json_schema(gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema {
292-
<Vec<RuleCategory>>::json_schema(gen)
291+
fn json_schema(r#gen: &mut schemars::r#gen::SchemaGenerator) -> schemars::schema::Schema {
292+
<Vec<RuleCategory>>::json_schema(r#gen)
293293
}
294294
}
295295

crates/pglt_analyse/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub use pglt_diagnostics::category_concat;
1111

1212
pub use crate::categories::{
1313
ActionCategory, RefactorKind, RuleCategories, RuleCategoriesBuilder, RuleCategory,
14-
SourceActionKind, SUPPRESSION_ACTION_CATEGORY,
14+
SUPPRESSION_ACTION_CATEGORY, SourceActionKind,
1515
};
1616
pub use crate::filter::{AnalysisFilter, GroupKey, RuleFilter, RuleKey};
1717
pub use crate::options::{AnalyserOptions, AnalyserRules};

crates/pglt_analyse/src/macros.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ macro_rules! declare_lint_rule {
2424
( $( #[doc = $doc:literal] )+ $vis:vis $id:ident {
2525
version: $version:literal,
2626
name: $name:tt,
27-
$( $key:ident: $value:expr, )*
27+
$( $key:ident: $value:expr_2021, )*
2828
} ) => {
2929

3030
pglt_analyse::declare_rule!(
@@ -53,7 +53,7 @@ macro_rules! declare_rule {
5353
( $( #[doc = $doc:literal] )+ $vis:vis $id:ident {
5454
version: $version:literal,
5555
name: $name:tt,
56-
$( $key:ident: $value:expr, )*
56+
$( $key:ident: $value:expr_2021, )*
5757
} ) => {
5858
$( #[doc = $doc] )*
5959
$vis enum $id {}

crates/pglt_analyse/src/registry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
use std::{borrow, collections::BTreeSet};
22

33
use crate::{
4+
AnalyserOptions,
45
context::RuleContext,
56
filter::{AnalysisFilter, GroupKey, RuleKey},
67
rule::{GroupCategory, Rule, RuleDiagnostic, RuleGroup},
7-
AnalyserOptions,
88
};
99

1010
pub trait RegistryVisitor {

crates/pglt_analyse/src/rule.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use pglt_console::fmt::Display;
2-
use pglt_console::{markup, MarkupBuf};
2+
use pglt_console::{MarkupBuf, markup};
33
use pglt_diagnostics::advice::CodeSuggestionAdvice;
44
use pglt_diagnostics::{
55
Advices, Category, Diagnostic, DiagnosticTags, Location, LogCategory, MessageAndDescription,

crates/pglt_analyser/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,9 @@ mod tests {
7272

7373
use pglt_analyse::{AnalyserOptions, AnalysisFilter, RuleFilter};
7474
use pglt_console::{
75+
Markup,
7576
fmt::{Formatter, Termcolor},
76-
markup, Markup,
77+
markup,
7778
};
7879
use pglt_diagnostics::PrintDiagnostic;
7980
use termcolor::NoColor;

crates/pglt_analyser/src/lint/safety/adding_required_field.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use pglt_analyse::{context::RuleContext, declare_lint_rule, Rule, RuleDiagnostic, RuleSource};
1+
use pglt_analyse::{Rule, RuleDiagnostic, RuleSource, context::RuleContext, declare_lint_rule};
22
use pglt_console::markup;
33

44
declare_lint_rule! {

crates/pglt_analyser/src/lint/safety/ban_drop_column.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use pglt_analyse::{context::RuleContext, declare_lint_rule, Rule, RuleDiagnostic, RuleSource};
1+
use pglt_analyse::{Rule, RuleDiagnostic, RuleSource, context::RuleContext, declare_lint_rule};
22
use pglt_console::markup;
33

44
declare_lint_rule! {

0 commit comments

Comments
 (0)