From 358c0bfc277f3da96550a6fb2bea9fcda5559b74 Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Fri, 1 Aug 2025 17:17:01 +0300 Subject: [PATCH] cargo fmt --- bindings/javascript/src/lib.rs | 35 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/bindings/javascript/src/lib.rs b/bindings/javascript/src/lib.rs index b75afd85d..4add30661 100644 --- a/bindings/javascript/src/lib.rs +++ b/bindings/javascript/src/lib.rs @@ -307,21 +307,17 @@ impl Statement { Ok(turso_core::StepResult::Row) => Ok(STEP_ROW), Ok(turso_core::StepResult::Done) => Ok(STEP_DONE), Ok(turso_core::StepResult::IO) => Ok(STEP_IO), - Ok(turso_core::StepResult::Interrupt) => { - Err(Error::new( - Status::GenericFailure, - "Statement was interrupted", - )) - } + Ok(turso_core::StepResult::Interrupt) => Err(Error::new( + Status::GenericFailure, + "Statement was interrupted", + )), Ok(turso_core::StepResult::Busy) => { Err(Error::new(Status::GenericFailure, "Database is busy")) } - Err(e) => { - Err(Error::new( - Status::GenericFailure, - format!("Step failed: {e}"), - )) - } + Err(e) => Err(Error::new( + Status::GenericFailure, + format!("Step failed: {e}"), + )), } } @@ -348,12 +344,15 @@ impl Statement { raw_array.coerce_to_object()?.to_unknown() } PresentationMode::Pluck => { - let (_, value) = row_data.get_values().enumerate().next().ok_or( - napi::Error::new( - napi::Status::GenericFailure, - "Pluck mode requires at least one column in the result", - ), - )?; + let (_, value) = + row_data + .get_values() + .enumerate() + .next() + .ok_or(napi::Error::new( + napi::Status::GenericFailure, + "Pluck mode requires at least one column in the result", + ))?; to_js_value(env, value)? } PresentationMode::Expanded => {