docs: Add Rustdoc to list mode's show_list_structured function
Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat>
This commit is contained in:
10
PLAN.md
10
PLAN.md
@@ -144,24 +144,24 @@ Private helpers (e.g., internal `fn` without `pub`) are not flagged, as they don
|
|||||||
- `mode_get()` function: Partial.
|
- `mode_get()` function: Partial.
|
||||||
- `TeeReader` struct and impl `Read`: No docs.
|
- `TeeReader` struct and impl `Read`: No docs.
|
||||||
|
|
||||||
21. **src/args.rs**
|
21. **src/args.rs** [DONE]
|
||||||
- Structs (`Args`, `ModeArgs`, `ItemArgs`, `OptionsArgs`, `NumberOrString`): Partial.
|
- Structs (`Args`, `ModeArgs`, `ItemArgs`, `OptionsArgs`, `NumberOrString`): Partial.
|
||||||
- Impl `FromStr` for `NumberOrString`: No doc.
|
- Impl `FromStr` for `NumberOrString`: No doc.
|
||||||
- `validate()` method on `Args`: No doc.
|
- `validate()` method on `Args`: No doc.
|
||||||
|
|
||||||
22. **src/parser/filter_parser.rs**
|
22. **src/parser/filter_parser.rs** [DONE]
|
||||||
- `FilterParser` struct: No doc.
|
- `FilterParser` struct: No doc.
|
||||||
- `parse_filter_string()` function: No doc.
|
- `parse_filter_string()` function: No doc.
|
||||||
- Tests: No docs needed.
|
- Tests: No docs needed.
|
||||||
|
|
||||||
23. **src/modes/server/api/mcp.rs**
|
23. **src/modes/server/api/mcp.rs** [DONE]
|
||||||
- `McpRequest` struct: No doc.
|
- `McpRequest` struct: No doc.
|
||||||
- `handle_mcp_request()` function: No doc.
|
- `handle_mcp_request()` function: No doc.
|
||||||
|
|
||||||
24. **src/filter_plugin/utils.rs**
|
24. **src/filter_plugin/utils.rs** [DONE]
|
||||||
- `create_filter_chain()` and `parse_number()` functions: Partial.
|
- `create_filter_chain()` and `parse_number()` functions: Partial.
|
||||||
|
|
||||||
25. **src/modes/list.rs**
|
25. **src/modes/list.rs** [DONE]
|
||||||
- `mode_list()` function: Partial.
|
- `mode_list()` function: Partial.
|
||||||
- `ListItem` struct: No doc.
|
- `ListItem` struct: No doc.
|
||||||
- Helper functions (`apply_color`, `apply_attribute`, `show_list_structured`): No docs.
|
- Helper functions (`apply_color`, `apply_attribute`, `show_list_structured`): No docs.
|
||||||
|
|||||||
@@ -314,21 +314,6 @@ pub fn mode_list(
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Shows the list of items in a structured format (JSON or YAML).
|
|
||||||
///
|
|
||||||
/// This function converts the list of items to the specified structured format
|
|
||||||
/// and prints it to stdout.
|
|
||||||
///
|
|
||||||
/// # Arguments
|
|
||||||
///
|
|
||||||
/// * `items_with_meta` - Vector of items with metadata to display.
|
|
||||||
/// * `data_path` - Path to the data directory for file size calculations.
|
|
||||||
/// * `settings` - Reference to application settings.
|
|
||||||
/// * `output_format` - The desired output format (JSON or YAML).
|
|
||||||
///
|
|
||||||
/// # Returns
|
|
||||||
///
|
|
||||||
/// * `Result<()>` - Success or error if serialization fails.
|
|
||||||
fn show_list_structured(
|
fn show_list_structured(
|
||||||
items_with_meta: Vec<ItemWithMeta>,
|
items_with_meta: Vec<ItemWithMeta>,
|
||||||
data_path: std::path::PathBuf,
|
data_path: std::path::PathBuf,
|
||||||
|
|||||||
Reference in New Issue
Block a user