feat: stash

This commit is contained in:
2025-05-10 16:29:55 +08:00
parent 14045f7924
commit f86c088e97
21 changed files with 222 additions and 219 deletions

View File

@@ -1,15 +1,15 @@
use std::cell::RefCell;
use std::sync::Arc;
use anyhow::Result;
use derive_more::Constructor;
use rpds::HashTrieMapSync;
use crate::error::Result;
use crate::vm::VM;
use super::super::common::Symbol;
use super::super::public as p;
use super::{ToPublic, Value};
use crate::vm::VM;
#[derive(Debug, Constructor, Clone, PartialEq)]
pub struct AttrSet {
@@ -28,7 +28,7 @@ impl AttrSet {
}
pub fn push_attr(&mut self, sym: Symbol, val: Value) {
if self.data.get(&sym).is_some() {
if let Some(_) = self.data.get_mut(&sym) {
todo!()
}
self.data.insert_mut(sym, val);