Skip to content

chore: finish converting load_nft.rs to arlog_*! macros (PR 2/4 for #90)#113

Merged
kalwalt merged 1 commit intowebarkit:devfrom
maxwelljhuang:chore/arlog-examples-pr2-load-nft
May 7, 2026
Merged

chore: finish converting load_nft.rs to arlog_*! macros (PR 2/4 for #90)#113
kalwalt merged 1 commit intowebarkit:devfrom
maxwelljhuang:chore/arlog-examples-pr2-load-nft

Conversation

@maxwelljhuang
Copy link
Copy Markdown
Contributor

Part 2 of 4 for #90 Finishes the conversion of crates/core/examples/load_nft.rs to arlog_*! macros — the file was previously half-converted (logger init + one arlog_i! call existed alongside 22 remaining println! calls). CLAUDE.md §2 names this file as the canonical example for newcomers, so getting it consistent matters beyond the mechanical cleanup.

Scope

  • crates/core/examples/load_nft.rs — 22 println! → arlog_i!. Trailing \n stripped from four format strings per PR 1's convention.

No other files touched. Existing import and Cargo.toml [[example]] block already cover this PR.

Classification note

All 22 sites are arlog_i!, including four inside bounded enumeration loops (pyramid scales, pages, image lists). The loops iterate over already-loaded NFT data with N ~1–10, not per-frame detection paths — matching the PR 1 precedent in debug_labeling.rs:92-97 where a take(10) enumeration loop also uses arlog_i!. Happy to revisit if you'd prefer arlog_d! for the loop bodies.

Verification

  • cargo fmt --all -- --check ✓
  • cargo build --example load_nft --features log-helpers ✓
  • cargo run --example load_nft --features log-helpers ✓ — confirmed [info] arlog output
  • cargo test ✓
  • grep for residual println!/eprintln! in load_nft.rs — zero matches

Skipped per pre-existing issues already documented on the issue thread: cargo build --all-features (macOS stdc++) and cargo clippy --all-targets -- -D warnings (lib-side doctest lint).

Completes the conversion of crates/core/examples/load_nft.rs from a
half-converted state (22 remaining println! calls alongside 1 existing
arlog_i!) to uniform arlog_*! usage. CLAUDE.md §2 names load_nft.rs as
the canonical example for newcomers, so getting this consistent matters
beyond the mechanical cleanup.

All 22 sites classified as arlog_i!, including four inside bounded
enumeration loops (pyramid scales, pages, image lists). The loops are
one-shot enumerations of loaded NFT data with N ~1-10, not per-frame
detection paths -- matching the PR 1 precedent in debug_labeling.rs
where a take(10) enumeration loop also uses arlog_i!.

Trailing \n stripped from four format strings per the established
convention (the log backend handles line structure). Imports and
Cargo.toml unchanged -- the existing use webarkitlib_rs::arlog_i; and
the existing [[example]] block already cover this PR.

Part 2 of 4 for webarkit#90.
Copy link
Copy Markdown
Member

@kalwalt kalwalt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, ready to be merged!

@kalwalt kalwalt merged commit c2ced9a into webarkit:dev May 7, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants