dtolnay / serde-ignored

Find out about keys that are ignored when deserializing data
Apache License 2.0
75 stars 8 forks source link

Thread `&'b mut F` instead of `F` everywhere #1

Closed alexcrichton closed 7 years ago

alexcrichton commented 7 years ago

I ran into a recursion limit bug when using this in Cargo because there's a point where Foo<F> got turned into Foo<&mut F>. Now everything would compile just fine as &mut F still implements FnMut, but in the interest of avoiding #![recursion_limit] I figured I'd go ahead and avoid the recursion in type parameters by just always using &mut F everywhere.

dtolnay commented 7 years ago

I added 31ca0e70d7ccf500d1f923c7aebfa2f7a65e02da (that doesn't cancel out your change does it?) and released 0.0.2.

alexcrichton commented 7 years ago

Ah yeah I think that works!

Still working through some more issues though, so there may be an 0.0.3 as well :)

alexcrichton commented 7 years ago

False alarm, that bug was a missing #[serde(rename = "...")], so 0.0.2 looks like a likely "cargo's gonna use this" candidate!