Skip to content

Commit

Permalink
libstd: Implement read_managed_str for the JSON deserialiser.
Browse files Browse the repository at this point in the history
The FIXME is an underlying issue (a core::at_str library) that this
doesn't address.
  • Loading branch information
huonw authored and graydon committed Dec 12, 2012
1 parent a55ea48 commit 76dc781
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/libstd/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -782,8 +782,11 @@ pub impl Deserializer: serialization::Deserializer {
}

fn read_managed_str(&self) -> @str {
// FIXME(#3604): There's no way to convert from a ~str to a @str.
fail ~"read_managed_str()";
debug!("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 {
Expand Down

0 comments on commit 76dc781

Please sign in to comment.