mirror of
https://github.com/trailbaseio/trailbase
synced 2026-04-21 13:37:44 +00:00
Address clippy issues.
This commit is contained in:
parent
f862c54df6
commit
fa49b10dfc
2 changed files with 10 additions and 6 deletions
|
|
@ -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))),
|
||||
},
|
||||
));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue