Skip to content

Commit ce3362b

Browse files
RoyLinRoyLin
authored andcommitted
fix: resolve clippy warnings (field_reassign_with_default, large_enum_variant, too_many_arguments)
1 parent c02f263 commit ce3362b

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

core/src/agent_api.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -805,9 +805,10 @@ impl Agent {
805805
// Inject agent system prompt via the extra slot (same as task tool).
806806
if opts.prompt_slots.is_none() {
807807
if let Some(ref prompt) = def.prompt {
808-
let mut slots = crate::prompts::SystemPromptSlots::default();
809-
slots.extra = Some(prompt.clone());
810-
opts.prompt_slots = Some(slots);
808+
opts.prompt_slots = Some(crate::prompts::SystemPromptSlots {
809+
extra: Some(prompt.clone()),
810+
..Default::default()
811+
});
811812
}
812813
}
813814

core/src/orchestrator/events.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use serde::{Deserialize, Serialize};
99
/// Orchestrator 事件 - 统一的事件类型
1010
#[derive(Debug, Clone, Serialize, Deserialize)]
1111
#[serde(tag = "event_type", rename_all = "snake_case")]
12+
#[allow(clippy::large_enum_variant)]
1213
pub enum OrchestratorEvent {
1314
/// SubAgent 启动
1415
SubAgentStarted {

core/src/orchestrator/wrapper.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ pub struct SubAgentWrapper {
2525
}
2626

2727
impl SubAgentWrapper {
28+
#[allow(clippy::too_many_arguments)]
2829
pub fn new(
2930
id: String,
3031
config: SubAgentConfig,

0 commit comments

Comments
 (0)