11use spacetimedb:: sats:: { i256, u256} ;
2- use spacetimedb:: { ConnectionId , Identity , ReducerContext , SpacetimeType , Table , Timestamp , TimeDuration , Uuid } ;
2+ use spacetimedb:: { ConnectionId , Identity , ReducerContext , SpacetimeType , Table , TimeDuration , Timestamp , Uuid } ;
33
44#[ derive( Copy , Clone ) ]
55#[ spacetimedb:: table( accessor = t_ints, public) ]
@@ -50,7 +50,7 @@ pub struct TOthers {
5050
5151#[ spacetimedb:: table( accessor = t_others_tuple, public) ]
5252pub struct TOthersTuple {
53- tuple : TOthers
53+ tuple : TOthers ,
5454}
5555
5656#[ derive( SpacetimeType , Debug , Clone , Copy ) ]
@@ -79,9 +79,9 @@ pub struct TEnum {
7979
8080#[ spacetimedb:: table( accessor = t_nested, public) ]
8181pub struct TNested {
82- en : TEnum ,
83- se : TSimpleEnum ,
84- ints : TInts ,
82+ en : TEnum ,
83+ se : TSimpleEnum ,
84+ ints : TInts ,
8585}
8686
8787#[ derive( Clone ) ]
@@ -127,7 +127,7 @@ pub fn test(ctx: &ReducerContext) {
127127 f32 : 594806.58906 ,
128128 f64 : -3454353.345389043278459 ,
129129 str : "This is spacetimedb" . to_string ( ) ,
130- bytes : vec ! ( 1 , 2 , 3 , 4 , 5 , 6 , 7 ) ,
130+ bytes : vec ! [ 1 , 2 , 3 , 4 , 5 , 6 , 7 ] ,
131131 identity : Identity :: ONE ,
132132 connection_id : ConnectionId :: ZERO ,
133133 timestamp : Timestamp :: UNIX_EPOCH ,
@@ -137,14 +137,29 @@ pub fn test(ctx: &ReducerContext) {
137137 ctx. db . t_others ( ) . insert ( tuple. clone ( ) ) ;
138138 ctx. db . t_others_tuple ( ) . insert ( TOthersTuple { tuple } ) ;
139139
140- ctx. db . t_simple_enum ( ) . insert ( TSimpleEnum { id : 1 , action : Action :: Inactive } ) ;
141- ctx. db . t_simple_enum ( ) . insert ( TSimpleEnum { id : 2 , action : Action :: Active } ) ;
140+ ctx. db . t_simple_enum ( ) . insert ( TSimpleEnum {
141+ id : 1 ,
142+ action : Action :: Inactive ,
143+ } ) ;
144+ ctx. db . t_simple_enum ( ) . insert ( TSimpleEnum {
145+ id : 2 ,
146+ action : Action :: Active ,
147+ } ) ;
142148
143- ctx. db . t_enum ( ) . insert ( TEnum { id : 1 , color : Color :: Gray ( 128 ) } ) ;
149+ ctx. db . t_enum ( ) . insert ( TEnum {
150+ id : 1 ,
151+ color : Color :: Gray ( 128 ) ,
152+ } ) ;
144153
145154 ctx. db . t_nested ( ) . insert ( TNested {
146- en : TEnum { id : 1 , color : Color :: Gray ( 128 ) } ,
147- se : TSimpleEnum { id : 2 , action : Action :: Active } ,
155+ en : TEnum {
156+ id : 1 ,
157+ color : Color :: Gray ( 128 ) ,
158+ } ,
159+ se : TSimpleEnum {
160+ id : 2 ,
161+ action : Action :: Active ,
162+ } ,
148163 ints,
149164 } ) ;
150165
0 commit comments