mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Support for extension methods, getResponseHeader(), and an extra error
This commit is contained in:
parent
1184b500e5
commit
e8de5f2f55
6 changed files with 51 additions and 27 deletions
|
@ -2,7 +2,9 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use std::from_str::FromStr;
|
||||
use std::hash::{Hash, sip};
|
||||
use std::path::BytesContainer;
|
||||
use std::str;
|
||||
|
||||
#[deriving(Encodable,Clone,TotalEq,Eq)]
|
||||
|
@ -113,4 +115,10 @@ impl Hash for ByteString {
|
|||
let ByteString(ref vec) = *self;
|
||||
vec.hash(state);
|
||||
}
|
||||
}
|
||||
|
||||
impl FromStr for ByteString {
|
||||
fn from_str(s: &str) -> Option<ByteString> {
|
||||
Some(ByteString::new(s.container_into_owned_bytes()))
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue