Fix code quality: trailing whitespace, unused imports, clippy warnings

- Fix trailing whitespace in kex.rs and s3.rs
- Add missing KexProposal import in kex_complete.rs
- Auto-fix clippy warnings across all crates
- All 153 tests pass
This commit is contained in:
Warren
2026-06-19 05:21:38 +08:00
parent 4b37e524cf
commit d94cb2df4c
135 changed files with 7256 additions and 4321 deletions

View File

@@ -630,28 +630,28 @@ mod tests {
}
}
// 新增:创建虚拟树类型
pub fn create_tree_type(
conn: &Connection,
tree_type: &str,
tree_name: &str,
description: &str,
is_system_defined: bool,
) -> Result<()> {
conn.execute(
"INSERT INTO tree_registry (tree_type, tree_name, description, is_system_defined)
// 新增:创建虚拟树类型
pub fn create_tree_type(
conn: &Connection,
tree_type: &str,
tree_name: &str,
description: &str,
is_system_defined: bool,
) -> Result<()> {
conn.execute(
"INSERT INTO tree_registry (tree_type, tree_name, description, is_system_defined)
VALUES (?1, ?2, ?3, ?4)",
rusqlite::params![tree_type, tree_name, description, is_system_defined as i64],
)?;
Ok(())
}
rusqlite::params![tree_type, tree_name, description, is_system_defined as i64],
)?;
Ok(())
}
// 新增:获取所有虚拟树类型
// 新增:删除虚拟树类型(仅限用户自定义)
pub fn delete_tree_type(conn: &Connection, tree_type: &str) -> Result<()> {
conn.execute(
"DELETE FROM tree_registry WHERE tree_type = ?1 AND is_system_defined = 0",
[tree_type],
)?;
Ok(())
}
// 新增:获取所有虚拟树类型
// 新增:删除虚拟树类型(仅限用户自定义)
pub fn delete_tree_type(conn: &Connection, tree_type: &str) -> Result<()> {
conn.execute(
"DELETE FROM tree_registry WHERE tree_type = ?1 AND is_system_defined = 0",
[tree_type],
)?;
Ok(())
}