servo / servo/rust-url

What happened to the `url!` macro?

Open
#652 13 comments 12 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1.6k
Forks
406
PR merge metrics
No merged PRs in 30d

Description

Use Urls any amount in rust and You'll end up with a decent bit of Url::new("string literal").unwrap() - it would seem a macro of some sort would be better for that, and a search shows that this indeed was a thing: https://github.com/servo/rust-url/pull/137

I couldn't find any issues/prs for removing it, so, what happened?

I've also ended up writing static urls with e.g. lazy_static! a bunch, which is also not ideal, since they are not evaluated at either compile or startup.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the current Url::new API and the historical pull request 137, then inspect existing usage of Url::new("string literal").unwrap() and lazy_static!. Done means establishing whether the url! macro or compile/startup handling should return, and documenting a concrete, agreed scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.