Skip to content

Conversation

@evilpie
Copy link
Contributor

@evilpie evilpie commented Sep 17, 2025

This now compiles and matches the code at

rust-urlpattern/src/lib.rs

Lines 266 to 283 in 4b585ac

/// ```
/// use urlpattern::UrlPattern;
/// use urlpattern::UrlPatternInit;
/// use urlpattern::UrlPatternMatchInput;
///
///# fn main() {
/// // Create the UrlPattern to match against.
/// let init = UrlPatternInit {
/// pathname: Some("/users/:id".to_owned()),
/// ..Default::default()
/// };
/// let pattern = <UrlPattern>::parse(init, Default::default()).unwrap();
///
/// // Match the pattern against a URL.
/// let url = "https://example.com/users/123".parse().unwrap();
/// let result = pattern.exec(UrlPatternMatchInput::Url(url)).unwrap().unwrap();
/// assert_eq!(result.pathname.groups.get("id").unwrap().as_ref().unwrap(), "123");
///# }
.

Fixes #71.

@evilpie
Copy link
Contributor Author

evilpie commented Oct 4, 2025

@crowlKats ping? I think this should be ok to land.

Copy link
Member

@crowlKats crowlKats left a comment

Choose a reason for hiding this comment

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

LGTM, sorry i didnt see a notification for this

@crowlKats crowlKats merged commit a9d1862 into denoland:main Oct 28, 2025
2 checks passed
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.

README.md example doesn't compile

2 participants