mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-12 23:41:03 +00:00
Adapt for removal of old interfaces in libsyntax
https://github.com/rust-lang/rust/commit/9108fb7bae11f18715d971eeae1e5ca84662e1ee dropped the `map()` method (among other things) -- so we need to adapt our code. This change should be backwards-compatible.
This commit is contained in:
@@ -12,11 +12,11 @@ use syntax::visit;
|
|||||||
// allowed here".
|
// allowed here".
|
||||||
pub fn without_defaults(generics: &ast::Generics) -> ast::Generics {
|
pub fn without_defaults(generics: &ast::Generics) -> ast::Generics {
|
||||||
ast::Generics {
|
ast::Generics {
|
||||||
ty_params: generics.ty_params.map(|ty_param| {
|
ty_params: generics.ty_params.iter().map(|ty_param| {
|
||||||
ast::TyParam {
|
ast::TyParam {
|
||||||
default: None,
|
default: None,
|
||||||
.. ty_param.clone()
|
.. ty_param.clone()
|
||||||
}}),
|
}}).collect(),
|
||||||
.. generics.clone()
|
.. generics.clone()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user