Skip to content
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

More doc examples. #245

Merged
merged 6 commits into from Dec 9, 2016
Next

Add doc example for `url::Url::parse`.

  • Loading branch information
frewsxcv committed Dec 2, 2016
commit e62dbb51949dbbf0299533cbe60acb65ff0a0096
@@ -228,6 +228,14 @@ impl<'a> ParseOptions<'a> {

impl Url {
/// Parse an absolute URL from a string.
///
/// # Examples
///
/// ```rust
/// use url::Url;
///
/// let url = Url::parse("https://example.net").unwrap();
/// ```
#[inline]
pub fn parse(input: &str) -> Result<Url, ::ParseError> {
Url::options().parse(input)
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.