mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-09 19:45:13 +02:00
cargo fmt
This commit is contained in:
parent
bec7bbf96c
commit
3a35cd6c8f
294 changed files with 6809 additions and 3911 deletions
|
|
@ -26,14 +26,13 @@ async fn get_surface(State(state): State<AppState>) -> ApiResult<Json<Value>> {
|
|||
|
||||
// Building the surface map can do filesystem IO + tree-sitter
|
||||
// parsing; keep it off the async runtime.
|
||||
let join_result = tokio::task::spawn_blocking(move || {
|
||||
load_or_build(&scan_root, &database_dir, &cfg)
|
||||
})
|
||||
.await
|
||||
.map_err(|e| ApiError::internal(format!("surface map task failed: {e}")))?;
|
||||
let join_result =
|
||||
tokio::task::spawn_blocking(move || load_or_build(&scan_root, &database_dir, &cfg))
|
||||
.await
|
||||
.map_err(|e| ApiError::internal(format!("surface map task failed: {e}")))?;
|
||||
|
||||
let mut map = join_result
|
||||
.map_err(|e| ApiError::internal(format!("failed to build surface map: {e}")))?;
|
||||
let mut map =
|
||||
join_result.map_err(|e| ApiError::internal(format!("failed to build surface map: {e}")))?;
|
||||
let bytes = map
|
||||
.to_json()
|
||||
.map_err(|e| ApiError::internal(format!("encode surface map: {e}")))?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue