Address clippy issues.

This commit is contained in:
Sebastian Jeltsch
2025-09-09 14:41:30 +02:00
parent f862c54df6
commit fa49b10dfc
2 changed files with 10 additions and 6 deletions

View File

@@ -140,7 +140,7 @@ pub(crate) async fn install_routes_and_jobs(
req.uri()
);
return runtime
let result = runtime
.call(
async move |instance| -> Result<axum::response::Response, WasmError> {
let (mut parts, body) = req.into_parts();
@@ -184,9 +184,13 @@ pub(crate) async fn install_routes_and_jobs(
return Ok(axum::response::Response::from_parts(parts, bytes.into()));
},
)
.await
.flatten()
.unwrap_or_else(internal_error_response);
.await;
return match result {
Ok(Ok(r)) => r,
Ok(Err(err)) => internal_error_response(err),
Err(err) => internal_error_response(err),
};
}
};

View File

@@ -91,7 +91,7 @@ pub enum Message {
}
#[derive(Clone)]
struct LockedTransaction(Arc<Mutex<Option<sqlite::OwnedTx>>>);
struct LockedTransaction(Rc<Mutex<Option<sqlite::OwnedTx>>>);
unsafe impl Send for LockedTransaction {}
@@ -655,7 +655,7 @@ impl RuntimeInstance {
http: WasiHttpCtx::new(),
kv: WasiKeyValueCtx::new(self.shared.kv_store.clone()),
shared: self.shared.clone(),
tx: LockedTransaction(Arc::new(Mutex::new(None))),
tx: LockedTransaction(Rc::new(Mutex::new(None))),
},
));
}