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

Add more doc examples. #212

Merged
merged 3 commits into from Aug 24, 2016
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

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

  • Loading branch information
frewsxcv committed Aug 24, 2016
commit 1475ea889a1a0e245d746577e4e07a1aed3f5845
@@ -423,6 +423,15 @@ impl Url {
}

/// Return the scheme of this URL, lower-cased, as an ASCII string without the ':' delimiter.
///
/// # Examples
///
/// ```
/// use url::Url;
///
/// let url = Url::parse("file:///tmp/foo").unwrap();
/// assert_eq!(url.scheme(), "file");
/// ```
#[inline]
pub fn scheme(&self) -> &str {
self.slice(..self.scheme_end)
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.