fix: resolve clippy warnings and test errors

- Implement FromStr trait for NodeType instead of custom from_str method
- Fix redundant_closure warning in server.rs:455
- Add #[allow(clippy::too_many_arguments)] for new_file_node
- Fix unused variables in tests (_user_id, _conn)
- Remove unused imports (NodeType, serde_json::json)
- Replace len() > 0 with !is_empty() for clarity
- Replace == false with negation operator
- Format code with cargo fmt
This commit is contained in:
Warren
2026-05-16 16:13:37 +08:00
parent e51728aa35
commit 8371aef693
8 changed files with 24 additions and 16 deletions

View File

@@ -54,7 +54,7 @@ fn test_is_apple_format_ext() {
fn test_is_document_ext_case_insensitive() {
//測試小寫convert.rs使用小寫比較
assert!(is_document_ext("docx"));
assert!(is_document_ext("DOCX") == false); //函數未轉小寫,直接比較
assert!(!is_document_ext("DOCX")); //函數未轉小寫,直接比較
}
#[test]