处理#[allow(dead_code)]代码

This commit is contained in:
xintaofei
2026-03-07 18:04:36 +08:00
parent b1ea16fae0
commit dacec69481
10 changed files with 10 additions and 29 deletions

View File

@@ -33,7 +33,6 @@ pub struct PlatformBinary {
#[derive(Debug, Clone)]
pub struct AcpAgentMeta {
#[allow(dead_code)]
pub agent_type: AgentType,
pub name: &'static str,
pub description: &'static str,
@@ -127,7 +126,6 @@ pub fn registry_id_for(agent_type: AgentType) -> &'static str {
}
}
#[allow(dead_code)]
pub fn from_registry_id(id: &str) -> Option<AgentType> {
match id {
"auggie" => Some(AgentType::Auggie),
@@ -155,6 +153,7 @@ pub fn from_registry_id(id: &str) -> Option<AgentType> {
}
pub fn get_agent_meta(agent_type: AgentType) -> AcpAgentMeta {
debug_assert_eq!(from_registry_id(registry_id_for(agent_type)), Some(agent_type));
match agent_type {
AgentType::Auggie => AcpAgentMeta {
agent_type,