From 0ff91e44513c78d5ff8a26e24468ae4127f24d2a Mon Sep 17 00:00:00 2001 From: Olaf Buddenhagen Date: Mon, 2 May 2016 07:08:43 +0200 Subject: [PATCH] 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. --- serde_codegen/src/bound.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/serde_codegen/src/bound.rs b/serde_codegen/src/bound.rs index ad973302..27b208b1 100644 --- a/serde_codegen/src/bound.rs +++ b/serde_codegen/src/bound.rs @@ -12,11 +12,11 @@ use syntax::visit; // allowed here". pub fn without_defaults(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 { default: None, .. ty_param.clone() - }}), + }}).collect(), .. generics.clone() } }