Skip to content

provides a simple implementation of FromStr for Pattern #39

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

Merged
merged 1 commit into from
Apr 13, 2015

Conversation

blaenk
Copy link
Contributor

@blaenk blaenk commented Apr 13, 2015

Curious what you think. It's not a clear win by any means, but in certain cases it feels more readable to me because it allows the string literal (if that's what we're parsing from) to stand out more.

// with FromStr
"js/**/*.js".parse().unwrap()

// without
Pattern::new("js/**/*.js").unwrap()

The implementation is very simple anyways, as it just delegates to Pattern::new, which I expect will be inlined.

@rust-highfive
Copy link

r? @huonw

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member

Thanks!

alexcrichton added a commit that referenced this pull request Apr 13, 2015
provides a simple implementation of FromStr for Pattern
@alexcrichton alexcrichton merged commit bfcc4fa into rust-lang:master Apr 13, 2015
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.

4 participants