Skip to content

ci: cargo fmt fails on font_handlers.rs and icon_handlers.rs (rustfmt line-length enforcement) #238

@evan-zhang11

Description

@evan-zhang11

Problem

The nightly CI has been failing since the Backend fmt step due to cargo fmt --check mismatches in two files:

backend/src/font_handlers.rs:182

-        let result = tokio::task::spawn_blocking(move || process_font(&original_path_clone, &glyphs_dir_clone)).await;
+        let result = tokio::task::spawn_blocking(move || {
+            process_font(&original_path_clone, &glyphs_dir_clone)
+        })
+        .await;

backend/src/icon_handlers.rs:413

-        Ok(data) => Ok((
-            StatusCode::OK,
-            [(header::CONTENT_TYPE, content_type)],
-            data,
-        )),
+        Ok(data) => Ok((StatusCode::OK, [(header::CONTENT_TYPE, content_type)], data)),

This is caused by a newer version of rustfmt (via actions-rust-lang/setup-rust-toolchain) enforcing different line-length wrapping rules than what was used when these files were last formatted.

Impact

  • All 8 open PRs are blocked — CI fails on verify job before any real checks run
  • Nightly CI has been failing continuously since at least 2026-04-29
  • Security CI (cargo audit + npm audit) also fails but is masked by the fmt failure

Fix

Run cargo fmt --manifest-path backend/Cargo.toml --all locally and commit the changes. This is a one-command fix.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions