Skip to content

Update string formatting for Rust 1.88 compatibility #494

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

18o
Copy link

@18o 18o commented Jul 3, 2025

No description provided.

@Copilot Copilot AI review requested due to automatic review settings July 3, 2025 09:21
@18o 18o requested a review from antonok-edm as a code owner July 3, 2025 09:21
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR modernizes string formatting across the codebase to use inline formatting ({var}) introduced in Rust 1.88, replacing legacy {}-based formatting in format!, println!, and write! macros.

  • Convert format!("…{}", var) and similar patterns to format!("…{var}")
  • Update println!, write!, and panic messages to inline formatting
  • Adjust a few API calls (e.g., Path and slice methods) for compatibility

Reviewed Changes

Copilot reviewed 27 out of 27 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/unit/resources/resource_storage.rs Use inline format! in scriptlet resource tests
tests/unit/resources/resource_assembler.rs Use inline format! in resource assembler tests
tests/unit/optimizer.rs Use inline format! in optimizer tests
tests/unit/filters/network_matchers.rs Use inline format! in network matcher tests
tests/unit/filters/network.rs Use inline format! in parse tests
tests/unit/filters/cosmetic.rs Use inline format! in cosmetic filter tests
tests/unit/engine.rs Use inline format! in engine tests
tests/unit/blocker.rs Use inline format! in blocker tests
tests/matching.rs Use inline format! in matching tests
tests/live.rs Use inline format! in live test output
tests/legacy_harness.rs Use inline format! in legacy harness tests
src/url_parser/parser.rs Use inline write! in URL serialization
src/resources/resource_storage.rs Use inline format! in argument stringification
src/resources/resource_assembler.rs Use inline panic! formatting for missing file error
src/resources/mod.rs Use inline eprintln! and write! in MimeType impl
src/regex_manager.rs Use inline format! in regex manager pattern building
src/network_filter_list.rs Use inline write! in CheckResult Display
src/filters/cosmetic.rs Use inline format! in CSS validation logic
src/cosmetic_filter_cache.rs Use inline format! in selector list generation
src/content_blocking.rs Use inline format! in content blocking conversion
src/blocker.rs Use inline format! in query param and URL assembly
js/src/lib.rs Update Neon API calls and inline formatting in error branch
fuzz/fuzz_targets/parse_request.rs Use inline format! in fuzz target URL construction
examples/use-dat.rs Use inline println! formatting in example
examples/example.rs Use inline println! formatting in example
examples/deserialization.rs Use inline println! formatting in deserialization example
benches/bench_redirect_performance.rs Use inline format! in benchmark setup and assertions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant