Skip to content

Commit 2bb63fa

Browse files
committed
update to rust edition 2024
1 parent c622a76 commit 2bb63fa

File tree

202 files changed

+416
-456
lines changed

Some content is hidden

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

202 files changed

+416
-456
lines changed

Cargo.lock

Lines changed: 6 additions & 6 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
@@ -7,9 +7,9 @@ members = [
77

88
[workspace.dependencies]
99
# local
10-
emmylua_code_analysis = { path = "crates/emmylua_code_analysis", version = "0.9.1" }
11-
emmylua_parser = { path = "crates/emmylua_parser", version = "0.11.2" }
12-
emmylua_diagnostic_macro = { path = "crates/emmylua_diagnostic_macro", version = "0.4.0" }
10+
emmylua_code_analysis = { path = "crates/emmylua_code_analysis", version = "0.10.0" }
11+
emmylua_parser = { path = "crates/emmylua_parser", version = "0.12.0" }
12+
emmylua_diagnostic_macro = { path = "crates/emmylua_diagnostic_macro", version = "0.5.0" }
1313

1414
# external
1515
lsp-server = "0.7.7"

crates/emmylua_check/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "emmylua_check"
3-
version = "0.9.1"
4-
edition = "2021"
3+
version = "0.10.0"
4+
edition = "2024"
55
authors = ["CppCXY"]
66
description = "A command-line tool for checking lua code."
77
license = "MIT"

crates/emmylua_check/src/init.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use emmylua_code_analysis::{
2-
load_configs, load_workspace_files, update_code_style, EmmyLuaAnalysis, Emmyrc, LuaFileInfo,
2+
EmmyLuaAnalysis, Emmyrc, LuaFileInfo, load_configs, load_workspace_files, update_code_style,
33
};
44
use fern::Dispatch;
55
use log::LevelFilter;

crates/emmylua_check/src/output/json_output_writer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::{fs::File, io::Write};
22

33
use emmylua_code_analysis::{DbIndex, FileId};
44
use lsp_types::Diagnostic;
5-
use serde_json::{json, Value};
5+
use serde_json::{Value, json};
66

77
use crate::cmd_args::OutputDestination;
88

crates/emmylua_check/src/output/mod.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,7 @@ pub async fn output_result(
7474
terminal_display.print_summary(error_count, warning_count, info_count, hint_count);
7575
}
7676

77-
if has_error {
78-
1
79-
} else {
80-
0
81-
}
77+
if has_error { 1 } else { 0 }
8278
}
8379

8480
trait OutputWriter {

crates/emmylua_code_analysis/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "emmylua_code_analysis"
3-
version = "0.9.1"
4-
edition = "2021"
3+
version = "0.10.0"
4+
edition = "2024"
55
authors = ["CppCXY"]
66
description = "A library for analyzing lua code."
77
license = "MIT"

crates/emmylua_code_analysis/src/compilation/analyzer/bind_type/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ use migrate_global_member::migrate_global_members_when_type_resolve;
44
use rowan::TextRange;
55

66
use crate::{
7-
db_index::{DbIndex, LuaMemberOwner, LuaType, LuaTypeDeclId},
87
InFiled, LuaMemberId, LuaTypeCache, LuaTypeOwner,
8+
db_index::{DbIndex, LuaMemberOwner, LuaType, LuaTypeDeclId},
99
};
1010

1111
pub fn bind_type(

crates/emmylua_code_analysis/src/compilation/analyzer/decl/docs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ use flagset::FlagSet;
66
use rowan::TextRange;
77

88
use crate::{
9-
db_index::{LuaDeclTypeKind, LuaTypeAttribute},
109
LuaTypeDecl, LuaTypeDeclId,
10+
db_index::{LuaDeclTypeKind, LuaTypeAttribute},
1111
};
1212

1313
use super::DeclAnalyzer;

crates/emmylua_code_analysis/src/compilation/analyzer/decl/exprs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ use emmylua_parser::{
55
};
66

77
use crate::{
8-
compilation::analyzer::unresolve::UnResolveTableField,
9-
db_index::{LuaDecl, LuaMember, LuaMemberKey, LuaMemberOwner},
108
FileId, InFiled, InferFailReason, LuaDeclExtra, LuaDeclId, LuaMemberFeature, LuaMemberId,
119
LuaSignatureId,
10+
compilation::analyzer::unresolve::UnResolveTableField,
11+
db_index::{LuaDecl, LuaMember, LuaMemberKey, LuaMemberOwner},
1212
};
1313

1414
use super::DeclAnalyzer;

0 commit comments

Comments
 (0)