File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ use std::{
66 sync:: LazyLock ,
77} ;
88
9- const FUNCTION_RUNNER_VERSION : & str = "8 .0.0" ;
9+ const FUNCTION_RUNNER_VERSION : & str = "9 .0.0" ;
1010const TRAMPOLINE_VERSION : & str = "1.0.0" ;
1111
1212fn workspace_root ( ) -> std:: path:: PathBuf {
@@ -189,7 +189,7 @@ pub fn run_example(
189189 let mut output_bytes = Vec :: new ( ) ;
190190 output. read_to_end ( & mut output_bytes) ?;
191191
192- let output: serde_json:: Value = serde_json:: from_slice ( & output_bytes) ?;
192+ let mut output: serde_json:: Value = serde_json:: from_slice ( & output_bytes) ?;
193193
194194 if !status. success ( ) {
195195 let logs = output
@@ -205,10 +205,9 @@ pub fn run_example(
205205 ) ;
206206 }
207207
208- let output_json_str = output
209- . get ( "output" )
210- . and_then ( |o| o. get ( "humanized" ) . and_then ( |h| h. as_str ( ) ) )
211- . ok_or_else ( || anyhow:: anyhow!( "No output" ) ) ?;
212- let output_json: serde_json:: Value = serde_json:: from_str ( output_json_str) ?;
208+ let output_json = output
209+ . get_mut ( "output" )
210+ . ok_or_else ( || anyhow:: anyhow!( "No output" ) ) ?
211+ . take ( ) ;
213212 Ok ( output_json)
214213}
You can’t perform that action at this time.
0 commit comments