These are chat archives for rust-lang/rust

Dec 2018
Akos Vandra
Dec 11 2018 00:18
no idea, this works for me
have been using it for months cant remember how i came up with it
Diego Antonio Rosario Palomino
Dec 11 2018 13:37
is there any way to close a rust program prematurely , that does not result in a runtime error
Michal 'vorner' Vaner
Dec 11 2018 13:38
@GunpowderGuy_gitlab std::process::exit?
Dec 11 2018 14:12
John Hughes
Dec 11 2018 19:00
Hi folks, question for the Serde enlightened: given struct S1 { field1: Vec<Rc<S2>> }. Is there a way that I can write a custom deserializer just for S2 or Rc<S2> and let derive(Deserialize) handle the rest?
Tim Robinson
Dec 11 2018 19:04
Yes, you can impl Deserialize for S2
Serde supports Rc but it won't attempt to share values on deserialization
John Hughes
Dec 11 2018 19:07
Cool, thanks
Dec 11 2018 19:19
You have to be the one implementing S2 in order to impl Deserialize for it.
John Hughes
Dec 11 2018 19:20
Thankfully it's from my own crate