libstd: Implement read_managed_str for the JSON deserialiser.
The FIXME is an underlying issue (a core::at_str library) that this doesn't address.
This commit is contained in:
parent
a55ea48d2b
commit
76dc7818ea
1 changed files with 5 additions and 2 deletions
|
@ -782,8 +782,11 @@ pub impl Deserializer: serialization::Deserializer {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn read_managed_str(&self) -> @str {
|
fn read_managed_str(&self) -> @str {
|
||||||
// FIXME(#3604): There's no way to convert from a ~str to a @str.
|
debug!("read_managed_str");
|
||||||
fail ~"read_managed_str()";
|
match *self.pop() {
|
||||||
|
String(ref s) => s.to_managed(),
|
||||||
|
_ => fail ~"not a string"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn read_owned<T>(&self, f: fn() -> T) -> T {
|
fn read_owned<T>(&self, f: fn() -> T) -> T {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue