I am trying to use mongodb library which has a lot of non_exhaustive structs and compiler fails to compile when I do
let options = UpdateOptions{
upsert:Some(true),
..Default::default()
}
however
let mut options = UpdateOptions::default();
options.upsert=Some(true)
compiles just fine.
Since if struct T
implements default all its fields must also implement default so I am failing to understand the difference between these 2 versions.