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:
@@ -4,7 +4,6 @@
|
||||
use markbase::filetree::node::NodeType;
|
||||
use markbase::filetree::{mode, FileTree};
|
||||
use rusqlite::Connection;
|
||||
use serde_json::json;
|
||||
use uuid::Uuid;
|
||||
|
||||
fn temp_db() -> (Connection, String) {
|
||||
@@ -213,7 +212,7 @@ fn test_api_logic_get_modes() {
|
||||
|
||||
#[test]
|
||||
fn test_api_logic_file_info() {
|
||||
let (conn, user_id) = temp_db();
|
||||
let (conn, _user_id) = temp_db();
|
||||
|
||||
let file_uuid = "test_file_uuid_123";
|
||||
FileTree::add_location(&conn, file_uuid, "/path/to/file.mp4", Some("origin")).unwrap();
|
||||
|
||||
Reference in New Issue
Block a user