Skip to content

Commit affce41

Browse files
committed
More doc tweaks.
1 parent 15d0ffd commit affce41

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub struct URL {
2121

2222
pub enum SchemeData {
2323
RelativeSchemeData(SchemeRelativeURL),
24-
OtherSchemeData(~str)
24+
OtherSchemeData(~str), // data: URLs, mailto: URLs, etc.
2525
}
2626

2727
pub struct SchemeRelativeURL {
@@ -49,6 +49,8 @@ pub struct IPv6Address {
4949
pub type ParseResult<T> = Result<T, &'static str>;
5050

5151
impl URL {
52+
// base_url is used to resolve relative URLs.
53+
// Relative URLs without a base return an error.
5254
pub fn parse(input: &str, base_url: Option<&URL>) -> ParseResult<URL>
5355
pub fn serialize(&self) -> ~str
5456
pub fn serialize_no_fragment(&self) -> ~str
@@ -66,6 +68,7 @@ impl IPv6Address {
6668

6769

6870
/// application/x-www-form-urlencoded
71+
/// Converts between a query string and name/value pairs.
6972
pub mod form_urlencoded {
7073
pub fn parse_str(input: &str) -> ~[(~str, ~str)]
7174
pub fn parse_bytes(input: &[u8], encoding_override: Option<encoding::EncodingRef>,

url.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub struct URL {
4242
#[deriving(Clone)]
4343
pub enum SchemeData {
4444
RelativeSchemeData(SchemeRelativeURL),
45-
OtherSchemeData(~str)
45+
OtherSchemeData(~str), // data: URLs, mailto: URLs, etc.
4646
}
4747

4848
#[deriving(Clone)]

0 commit comments

Comments
 (0)