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 a few doc examples. #239

Merged
merged 4 commits into from Nov 14, 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

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

  • Loading branch information
frewsxcv committed Nov 14, 2016
commit 28a7e7ab6aac86b70de863dbed2d78d1cd687015
@@ -289,6 +289,16 @@ impl Url {
/// Return the serialization of this URL.
///
/// This consumes the `Url` and takes ownership of the `String` stored in it.
///
/// # Examples
///
/// ```rust
/// use url::Url;
///
/// let url_str = "https://example.net/";
/// let url = Url::parse(url_str).unwrap();
/// assert_eq!(url.into_string(), url_str);
/// ```
#[inline]
pub fn into_string(self) -> String {
self.serialization
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.