From 8422e0ada52d8036c32257d84f069776e520079e Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Sun, 3 May 2026 01:31:04 +0800 Subject: Add missing articles and improve documentation --- mingling_core/src/asset/comp/suggest.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'mingling_core/src/asset/comp/suggest.rs') diff --git a/mingling_core/src/asset/comp/suggest.rs b/mingling_core/src/asset/comp/suggest.rs index 62844a7..6d64341 100644 --- a/mingling_core/src/asset/comp/suggest.rs +++ b/mingling_core/src/asset/comp/suggest.rs @@ -66,10 +66,20 @@ impl std::ops::DerefMut for Suggest { } } +/// Represents a single suggestion item for shell completion. +/// +/// This enum has two variants: +/// - `Simple(String)`: A suggestion without any description. +/// - `WithDescription(String, String)`: A suggestion with an associated description. +/// +/// The first `String` always holds the suggestion text, and the second `String` (if present) +/// holds an optional description providing additional context. #[derive(Debug, Clone, PartialEq, Eq, Hash)] #[cfg_attr(feature = "general_renderer", derive(serde::Serialize))] pub enum SuggestItem { + /// A simple suggestion with only the suggestion text. Simple(String), + /// A suggestion with both text and a description. WithDescription(String, String), } -- cgit