1
Fork 0

Remove box syntax from rustc_serialize

This commit is contained in:
est31 2021-08-05 04:53:51 +02:00
parent 395e7dfc2a
commit 823e6f161a
2 changed files with 1 additions and 2 deletions

View file

@ -679,6 +679,6 @@ impl<S: Encoder, T: ?Sized + Encodable<S>> Encodable<S> for Box<T> {
}
impl<D: Decoder, T: Decodable<D>> Decodable<D> for Box<T> {
fn decode(d: &mut D) -> Result<Box<T>, D::Error> {
Ok(box Decodable::decode(d)?)
Ok(Box::new(Decodable::decode(d)?))
}
}