Add ObjectPtr::new_pair()
This commit is contained in:
parent
8475720a71
commit
5a5a0c9c07
1 changed files with 7 additions and 1 deletions
|
@ -40,7 +40,13 @@ pub enum Object {
|
|||
}
|
||||
|
||||
impl ObjectPtr {
|
||||
pub fn new(obj: Object) -> ObjectPtr { ObjectPtr::Ptr(Box::new(obj)) }
|
||||
pub fn new(obj: Object) -> ObjectPtr {
|
||||
ObjectPtr::Ptr(Box::new(obj))
|
||||
}
|
||||
|
||||
pub fn new_pair() -> ObjectPtr {
|
||||
ObjectPtr::new(Object::Pair(ObjectPtr::Null, ObjectPtr::Null))
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for ObjectPtr {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue