Open
Description
I have a program with three (3) default Url
s used in multiple places.
Right now, I'm doing CONSTANT_1.parse().expect("statically known url is invalid")
everytime and just relying on tests to catch mistakes (not that they have ever changed but still, I don't want to leave it to chance).
I could use a LazyCell
and do the expect
dance once but that means I still have to do expect
Is it possible to either modify Url
or have a ConstUrl::new("static str").into() -> Url
?
My personal use case is something like http(s)://<ip|domain>:<port>
so I would be fine with a first version explicitly refusing to support more than this, but I can understand that being too limiting for other use cases
Metadata
Metadata
Assignees
Labels
No labels