fix decode logic for 'AttrId' to be symmetric with encode logic
This commit is contained in:
parent
3211b83134
commit
928eedb0aa
@ -2218,8 +2218,8 @@ fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
|
||||
}
|
||||
|
||||
impl rustc_serialize::Decodable for AttrId {
|
||||
fn decode<D: Decoder>(_: &mut D) -> Result<AttrId, D::Error> {
|
||||
Ok(crate::attr::mk_attr_id())
|
||||
fn decode<D: Decoder>(d: &mut D) -> Result<AttrId, D::Error> {
|
||||
d.read_nil().map(|_| crate::attr::mk_attr_id())
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user