Skip to content

Commit 5a98385

Browse files
committed
fix test
1 parent 408d6e2 commit 5a98385

File tree

6 files changed

+14
-7
lines changed

6 files changed

+14
-7
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ members = [
66

77
[workspace.dependencies]
88
# local
9-
xmake_code_analysis = { path = "crates/xmake_code_analysis", version = "0.3.0" }
10-
xmake_ls = { path = "crates/xmake_ls", version = "0.3.0" }
9+
xmake_code_analysis = { path = "crates/xmake_code_analysis", version = "0.4.0" }
10+
xmake_ls = { path = "crates/xmake_ls", version = "0.4.0" }
1111
xmake_formatter = { path = "crates/xmake_formatter", version = "0.2.0" }
1212
xmake_wrapper = { path = "crates/xmake_wrapper", version = "0.1.0" }
1313

crates/xmake_code_analysis/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "xmake_code_analysis"
3-
version = "0.3.0"
3+
version = "0.4.0"
44
edition = "2024"
55
authors = ["CppCXY"]
66
description = "A library for analyzing xmake code."

crates/xmake_code_analysis/src/compilation/analyzer/unresolve/resolve_closure.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,13 @@ pub fn try_resolve_call_closure_params(
5151
}
5252

5353
let param_type = if closure_params.is_last_param {
54-
call_doc_func.get_params().last()
54+
let params = call_doc_func.get_params();
55+
if params.len() > 1 && params.first().unwrap().0 == "..." {
56+
// 最后一个参数是可变参数
57+
params.last()
58+
} else {
59+
call_doc_func.get_params().get(param_idx)
60+
}
5561
} else {
5662
call_doc_func.get_params().get(param_idx)
5763
};

crates/xmake_ls/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "xmake_ls"
3-
version = "0.3.0"
3+
version = "0.4.0"
44
edition = "2024"
55
authors = ["CppCXY"]
66
description = "A language server for xmake."

crates/xmake_ls/src/handlers/initialized/client_config/vscode_config.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use crate::handlers::initialized::client_config::default_config::get_client_conf
44
use serde::{Deserialize, Serialize};
55
use std::collections::HashMap;
66

7+
#[allow(unused)]
78
#[derive(Debug, Deserialize, Serialize)]
89
struct VscodeFilesConfig {
910
exclude: Option<HashMap<String, bool>>,

0 commit comments

Comments
 (0)