-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
Description
Context
Two identical free functions in zeph-core agent module differ only in type parameter:
async fn recv_skill_event(rx: &mut Option<mpsc::Receiver<SkillEvent>>) -> Option<SkillEvent> { ... }
async fn recv_config_event(rx: &mut Option<mpsc::Receiver<ConfigEvent>>) -> Option<ConfigEvent> { ... }Proposed change
Replace with a single generic helper:
async fn recv_optional<T>(rx: &mut Option<mpsc::Receiver<T>>) -> Option<T> {
match rx {
Some(rx) => rx.recv().await,
None => std::future::pending().await,
}
}Affected crates
zeph-core
Complexity
Trivial
References
.local/plan/architecture-audit.md — Phase 4, item 4.2
Reactions are currently unavailable