mirror of
https://github.com/trailbaseio/trailbase.git
synced 2025-12-19 08:30:19 -06:00
Address clippy issues.
This commit is contained in:
@@ -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),
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -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))),
|
||||
},
|
||||
));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user