aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Walters <rwalters@digitalstirling.com>2020-10-30 20:41:50 -0700
committerRichard Walters <rwalters@digitalstirling.com>2020-10-30 20:41:50 -0700
commit08045e8379a0e16bd9ec4dcdf3eb66e50180bdd9 (patch)
tree8fd3828f978272172b5c55c78c0f99fccf6cd228
parent98d33f8dd784238eb3319eb5461afe4ed26ea216 (diff)
Fix documentation warnings caused by recent Rust tool changes
-rw-r--r--src/uri.rs21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/uri.rs b/src/uri.rs
index bee9783..f318bf6 100644
--- a/src/uri.rs
+++ b/src/uri.rs
@@ -199,9 +199,9 @@ impl Uri {
/// # Errors
///
/// Since host names may contain non-UTF8 byte sequences, this function may
- /// return
- /// [`Error::CannotExpressAsUtf8`](enum.Error.html#variant.
- /// CannotExpressAsUtf8).
+ /// return [`Error::CannotExpressAsUtf8`][CannotExpressAsUtf8].
+ ///
+ /// [CannotExpressAsUtf8]: enum.Error.html#variant.CannotExpressAsUtf8
#[must_use = "I made that host field into a string for you; don't you want it?"]
pub fn host_to_string(&self) -> Result<Option<String>, Error> {
self.host()
@@ -447,8 +447,9 @@ impl Uri {
///
/// Since path segments may contain non-UTF8 byte sequences, this function
/// may return
- /// [`Error::CannotExpressAsUtf8`](enum.Error.html#variant.
- /// CannotExpressAsUtf8).
+ /// [`Error::CannotExpressAsUtf8`][CannotExpressAsUtf8].
+ ///
+ /// [CannotExpressAsUtf8]: enum.Error.html#variant.CannotExpressAsUtf8
#[must_use = "we went through all that trouble to put the path into a string, and you don't want it?"]
pub fn path_to_string(&self) -> Result<String, Error> {
match &*self.path {
@@ -474,8 +475,9 @@ impl Uri {
/// # Errors
///
/// Since queries may contain non-UTF8 byte sequences, this function may
- /// return [`Error::CannotExpressAsUtf8`](enum.Error.html#variant.
- /// CannotExpressAsUtf8).
+ /// return [`Error::CannotExpressAsUtf8`][CannotExpressAsUtf8].
+ ///
+ /// [CannotExpressAsUtf8]: enum.Error.html#variant.CannotExpressAsUtf8
#[must_use = "use the query return value silly programmer"]
pub fn query_to_string(&self) -> Result<Option<String>, Error> {
self.query()
@@ -751,8 +753,9 @@ impl Uri {
/// # Errors
///
/// Since fragments may contain non-UTF8 byte sequences, this function may
- /// return [`Error::CannotExpressAsUtf8`](enum.Error.html#variant.
- /// CannotExpressAsUtf8).
+ /// return [`Error::CannotExpressAsUtf8`][CannotExpressAsUtf8].
+ ///
+ /// [CannotExpressAsUtf8]: enum.Error.html#variant.CannotExpressAsUtf8
#[must_use = "come on, you intended to use that userinfo return value, didn't you?"]
pub fn userinfo_to_string(&self) -> Result<Option<String>, Error> {
self.userinfo()