Просмотр исходного кода

add error documentation on parse function

rap2h 9 лет назад
Родитель
Сommit
b8e1a95529
1 измененных файлов с 7 добавлено и 0 удалено
  1. 7 0
      src/lib.rs

+ 7 - 0
src/lib.rs

@@ -252,6 +252,13 @@ impl Url {
     /// # }
     /// # }
     /// # run().unwrap();
     /// # run().unwrap();
     /// ```
     /// ```
+    /// 
+    /// # Errors
+    ///
+    /// If the function can not parse an absolute URL from the given string,
+    /// a [`ParseError`] variant will be returned.
+    ///
+    /// [`ParseError`]: enum.ParseError.html
     #[inline]
     #[inline]
     pub fn parse(input: &str) -> Result<Url, ::ParseError> {
     pub fn parse(input: &str) -> Result<Url, ::ParseError> {
         Url::options().parse(input)
         Url::options().parse(input)