feat: Unified registry and major code cleanup by ChatGPT5
- Unified Box Registry: Replaced 600+ line match statement with clean factory pattern - Code cleanup: Removed unused imports, variables, and dead code - Import fixes: Fixed RangeBox, NullBox, MapBox imports - Transport Debug: Added Debug trait implementation for Transport interface - WASM build: Successfully tested with wasm_playground preset ready for integration - Performance: Build time stable, WASM package generated successfully (1.89MB) This commit represents a major architectural improvement with the unified registry system now fully operational, reducing code duplication and improving maintainability. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -37,8 +37,7 @@
|
||||
|
||||
use crate::box_trait::{NyashBox, StringBox, BoolBox, BoxCore, BoxBase};
|
||||
use crate::boxes::IntentBox;
|
||||
use crate::transport::{Transport, InProcessTransport, TransportError};
|
||||
use crate::messaging::IntentHandler;
|
||||
use crate::transport::{Transport, InProcessTransport};
|
||||
use std::any::Any;
|
||||
use std::sync::RwLock;
|
||||
use std::collections::HashMap;
|
||||
@ -135,6 +134,7 @@ impl P2PBox {
|
||||
let mut handlers = self.handlers.write().unwrap();
|
||||
handlers.insert(intent_str, handler);
|
||||
Box::new(BoolBox::new(true))
|
||||
}
|
||||
/// ノードが到達可能かチェック
|
||||
pub fn is_reachable(&self, node_id: Box<dyn NyashBox>) -> Box<dyn NyashBox> {
|
||||
let node_str = node_id.to_string_box().value;
|
||||
@ -208,4 +208,4 @@ impl std::fmt::Display for P2PBox {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
self.fmt_box(f)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user