Fix CI: Apply cargo fmt to latest changes

This commit is contained in:
Peter Steinberger 2025-06-18 13:54:22 +02:00
parent 779f8f3360
commit db4b60e5f7
4 changed files with 15 additions and 12 deletions

View file

@ -1053,7 +1053,7 @@ fn handle_session_kill(control_path: &Path, path: &str) -> Response<String> {
} }
(StatusCode::OK, "Session killed") (StatusCode::OK, "Session killed")
}, }
Err(e) => { Err(e) => {
let response = ApiResponse { let response = ApiResponse {
success: None, success: None,

View file

@ -600,9 +600,11 @@ impl Iterator for StreamingIterator {
// Check if we've been waiting too long (5 seconds timeout) // Check if we've been waiting too long (5 seconds timeout)
if let Some(wait_start) = self.wait_start { if let Some(wait_start) = self.wait_start {
if wait_start.elapsed().unwrap_or_default() > std::time::Duration::from_secs(5) { if wait_start.elapsed().unwrap_or_default()
> std::time::Duration::from_secs(5)
{
self.state = StreamingState::Error( self.state = StreamingState::Error(
"Timeout waiting for stream file to be created".to_string() "Timeout waiting for stream file to be created".to_string(),
); );
return None; return None;
} }

View file

@ -449,7 +449,8 @@ fn spawn(mut opts: SpawnOptions) -> Result<i32, Error> {
// Send exit event to stream before updating session status // Send exit event to stream before updating session status
if let Some(ref mut stream_writer) = stream_writer { if let Some(ref mut stream_writer) = stream_writer {
let session_id = opts.session_json_path let session_id = opts
.session_json_path
.as_ref() .as_ref()
.and_then(|p| p.file_stem()) .and_then(|p| p.file_stem())
.and_then(|s| s.to_str()) .and_then(|s| s.to_str())