Skip to content

Commit 4f51838

Browse files
committed
Remove some unused stuff from url
1 parent 164b4a3 commit 4f51838

1 file changed

Lines changed: 0 additions & 13 deletions

File tree

src/url.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use std::fmt;
1211
use std::str::FromStr;
1312
use std::num;
1413
use std::str;
1514

16-
#[derive(Clone, PartialEq, Eq)]
1715
pub struct Url {
1816
pub scheme: String,
1917
pub user: Option<UserInfo>,
@@ -22,14 +20,12 @@ pub struct Url {
2220
pub path: Path,
2321
}
2422

25-
#[derive(Clone, PartialEq, Eq)]
2623
pub struct Path {
2724
pub path: String,
2825
pub query: Query,
2926
pub fragment: Option<String>
3027
}
3128

32-
#[derive(Clone, PartialEq, Eq)]
3329
pub struct UserInfo {
3430
pub user: String,
3531
pub pass: Option<String>
@@ -163,15 +159,6 @@ fn split_char_first(s: &str, c: char) -> (&str, &str) {
163159
}
164160
}
165161

166-
impl fmt::Debug for UserInfo {
167-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
168-
match self.pass {
169-
Some(ref pass) => write!(f, "{}:{}@", self.user, *pass),
170-
None => write!(f, "{}@", self.user),
171-
}
172-
}
173-
}
174-
175162
fn query_from_str(rawquery: &str) -> DecodeResult<Query> {
176163
let mut query: Query = vec!();
177164
if !rawquery.is_empty() {

0 commit comments

Comments
 (0)