🔧 Phase A: Add share_box() method to NyashBox trait and all Box implementations
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
This commit is contained in:
@ -38,6 +38,12 @@ impl NyashResultBox {
|
||||
|
||||
impl NyashBox for NyashResultBox {
|
||||
fn clone_box(&self) -> Box<dyn NyashBox> {
|
||||
|
||||
/// 仮実装: clone_boxと同じ(後で修正)
|
||||
fn share_box(&self) -> Box<dyn NyashBox> {
|
||||
self.clone_box()
|
||||
}
|
||||
|
||||
match self {
|
||||
NyashResultBox::Ok(val) => Box::new(NyashResultBox::Ok(val.clone_box())),
|
||||
NyashResultBox::Err(err) => Box::new(NyashResultBox::Err(err.clone_box())),
|
||||
|
||||
Reference in New Issue
Block a user