Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/form_urlencoded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pub fn parse_bytes(input: &[u8], encoding_override: Option<EncodingRef>,
}
} else {
let (name, value) = match piece.position_elem(&b'=') {
Some(position) => (piece.slice_to(position), piece.slice_from(position + 1)),
Some(position) => (piece[..position], piece[position + 1..]),
None => if isindex { ([].as_slice(), piece) } else { (piece, [].as_slice()) }
};
let name = replace_plus(name);
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ assert!(css_url.serialize() == "http://servo.github.io/rust-url/main.css".to_str

*/


#![feature(macro_rules, default_type_params)]
#![feature(slicing_syntax)]

extern crate encoding;
extern crate serialize;
Expand Down Expand Up @@ -991,7 +991,7 @@ impl FromUrlPath for path::windows::Path {
return Err(())
}
let mut bytes = prefix.as_bytes().to_vec();
for path_part in path.slice_from(1).iter() {
for path_part in path[1..].iter() {
bytes.push(b'\\');
percent_decode_to(path_part.as_bytes(), &mut bytes);
}
Expand Down