11mod object_list;
22
33use std:: collections:: HashMap ;
4+ use std:: rc:: Rc ;
45use std:: str:: FromStr ;
5- use std:: sync:: Arc ;
66
77use gel_schema:: {
88 Class , Container , ContainerTy , EnumTy , Expression , ObjectDict , ObjectIndex , ObjectIndexTy ,
@@ -666,7 +666,7 @@ fn value_from_py<'p>(py: Python<'p>, val: Bound<'p, PyAny>) -> PyResult<Value> {
666666
667667 let func_param_list = imports:: FuncParameterList ( py) ?;
668668 if val. is_exact_instance ( func_param_list) {
669- return Ok ( Value :: ObjectList ( Arc :: new ( ObjectList {
669+ return Ok ( Value :: ObjectList ( Rc :: new ( ObjectList {
670670 ty : ObjectListTy :: FuncParameterList ,
671671 value_ty : None ,
672672 values : uuids_from_py ( val. getattr ( "_ids" ) ?) ?,
@@ -711,7 +711,7 @@ fn value_from_py<'p>(py: Python<'p>, val: Bound<'p, PyAny>) -> PyResult<Value> {
711711
712712 let object_list = imports:: ObjectList ( py) ?;
713713 if ty_base_0. as_ref ( ) . map_or ( false , |t| t. is ( object_list) ) {
714- return Ok ( Value :: ObjectList ( Arc :: new ( ObjectList {
714+ return Ok ( Value :: ObjectList ( Rc :: new ( ObjectList {
715715 ty : ObjectListTy :: ObjectList ,
716716 value_ty : parametric_arg_from_py ( & val) ?,
717717 values : uuids_from_py ( val. getattr ( "_ids" ) ?) ?,
@@ -720,7 +720,7 @@ fn value_from_py<'p>(py: Python<'p>, val: Bound<'p, PyAny>) -> PyResult<Value> {
720720
721721 let object_set = imports:: ObjectSet ( py) ?;
722722 if ty_base_0. as_ref ( ) . map_or ( false , |t| t. is ( object_set) ) {
723- return Ok ( Value :: ObjectSet ( Arc :: new ( ObjectSet {
723+ return Ok ( Value :: ObjectSet ( Rc :: new ( ObjectSet {
724724 value_ty : parametric_arg_from_py ( & val) ?,
725725 values : uuids_from_py ( val. getattr ( "_ids" ) ?) ?,
726726 } ) ) ) ;
@@ -741,7 +741,7 @@ fn value_from_py<'p>(py: Python<'p>, val: Bound<'p, PyAny>) -> PyResult<Value> {
741741 . map ( |x| x. to_string ( ) )
742742 . collect ( ) ;
743743
744- return Ok ( Value :: ObjectDict ( Arc :: new ( ObjectDict {
744+ return Ok ( Value :: ObjectDict ( Rc :: new ( ObjectDict {
745745 keys,
746746 values,
747747 value_ty,
@@ -783,7 +783,7 @@ fn value_from_py<'p>(py: Python<'p>, val: Bound<'p, PyAny>) -> PyResult<Value> {
783783 )
784784 } ;
785785
786- return Ok ( Value :: ObjectIndex ( Arc :: new ( ObjectIndex {
786+ return Ok ( Value :: ObjectIndex ( Rc :: new ( ObjectIndex {
787787 ty : object_index_ty,
788788 value_ty,
789789 values,
@@ -794,7 +794,7 @@ fn value_from_py<'p>(py: Python<'p>, val: Bound<'p, PyAny>) -> PyResult<Value> {
794794 // weird: this shouldn't be necessary, because nothing is reduced as a list
795795 // nevertheless Object.bases, is sometimes reduced to a list of uuids
796796 if let Ok ( val) = val. cast_exact :: < PyList > ( ) {
797- return Ok ( Value :: ObjectList ( Arc :: new ( ObjectList {
797+ return Ok ( Value :: ObjectList ( Rc :: new ( ObjectList {
798798 ty : ObjectListTy :: ObjectList ,
799799 value_ty : Some ( "InheritingObject" . into ( ) ) ,
800800 values : val
@@ -818,7 +818,7 @@ fn value_from_py<'p>(py: Python<'p>, val: Bound<'p, PyAny>) -> PyResult<Value> {
818818 values. push ( value_from_py ( py, item) ?) ;
819819 }
820820
821- return Ok ( Value :: Container ( Arc :: new ( Container {
821+ return Ok ( Value :: Container ( Rc :: new ( Container {
822822 ty,
823823 values,
824824 value_ty,
@@ -836,7 +836,7 @@ fn value_from_py<'p>(py: Python<'p>, val: Bound<'p, PyAny>) -> PyResult<Value> {
836836 values. push ( value_from_py ( py, item) ?) ;
837837 }
838838
839- return Ok ( Value :: Container ( Arc :: new ( Container {
839+ return Ok ( Value :: Container ( Rc :: new ( Container {
840840 ty : gel_schema:: ContainerTy :: FrozenCheckedSet ,
841841 values,
842842 value_ty,
0 commit comments