File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,7 +80,10 @@ pub async fn launch_simulation(params: LaunchParams) -> Result<typedb_reader::Ru
8080 . args ( [ "--seed" , & seed. to_string ( ) ] )
8181 . args ( [ "--steps" , & params. steps . to_string ( ) ] )
8282 . args ( [ "--run-id" , & run_id] )
83- . args ( [ "--update-mode" , params. update_mode . as_deref ( ) . unwrap_or ( "async" ) ] ) ;
83+ . args ( [
84+ "--update-mode" ,
85+ params. update_mode . as_deref ( ) . unwrap_or ( "async" ) ,
86+ ] ) ;
8487
8588 if let Some ( ref json_path) = params. json_path {
8689 cmd. args ( [ "--json-path" , json_path] ) ;
Original file line number Diff line number Diff line change @@ -106,7 +106,10 @@ pub fn classify_openness(model: &WorldModel) -> String {
106106 if matches ! ( ix. ty, InteractionType :: Force ) {
107107 continue ;
108108 }
109- if !matches ! ( ix. substance. ty, SubstanceType :: Energy | SubstanceType :: Material ) {
109+ if !matches ! (
110+ ix. substance. ty,
111+ SubstanceType :: Energy | SubstanceType :: Material
112+ ) {
110113 continue ;
111114 }
112115 if ix. source . ty == IdType :: Source {
Original file line number Diff line number Diff line change @@ -142,16 +142,18 @@ pub fn SimPanel(
142142 let update_mode = mj
143143 . as_ref ( )
144144 . and_then ( |json| serde_json:: from_str :: < serde_json:: Value > ( json) . ok ( ) )
145- . and_then ( |v| v[ "interactions" ] . as_array ( ) . map ( |ixs| {
146- ixs. iter ( ) . any ( |ix| {
147- ix[ "parameters" ] . as_array ( ) . is_some_and ( |ps| {
148- ps. iter ( ) . any ( |p| {
149- p[ "name" ] . as_str ( ) == Some ( "observation" )
150- && p[ "value" ] . as_str ( ) == Some ( "true" )
145+ . and_then ( |v| {
146+ v[ "interactions" ] . as_array ( ) . map ( |ixs| {
147+ ixs. iter ( ) . any ( |ix| {
148+ ix[ "parameters" ] . as_array ( ) . is_some_and ( |ps| {
149+ ps. iter ( ) . any ( |p| {
150+ p[ "name" ] . as_str ( ) == Some ( "observation" )
151+ && p[ "value" ] . as_str ( ) == Some ( "true" )
152+ } )
151153 } )
152154 } )
153155 } )
154- } ) )
156+ } )
155157 . map ( |has_obs| if has_obs { "synchronous" } else { "async" } . to_string ( ) ) ;
156158 let params = LaunchParams {
157159 seed,
You can’t perform that action at this time.
0 commit comments