Json doesn't need to depend on IoError to implement Encodable #13230

This commit is contained in:
Eunchong Yu 2014-04-01 02:37:38 +09:00
parent 1c2ccf0503
commit 2deca5840e
1 changed files with 2 additions and 2 deletions

View File

@ -732,8 +732,8 @@ impl<'a> ::Encoder<io::IoError> for PrettyEncoder<'a> {
}
}
impl<E: ::Encoder<io::IoError>> Encodable<E, io::IoError> for Json {
fn encode(&self, e: &mut E) -> EncodeResult {
impl<E: ::Encoder<S>, S> Encodable<E, S> for Json {
fn encode(&self, e: &mut E) -> Result<(), S> {
match *self {
Number(v) => v.encode(e),
String(ref v) => v.encode(e),