-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
mongodb rust driver version: 2.0.0.alpha.1
std::mem::size_of::<mongodb::error::Error>() = 320
std::mem::size_of::<mongodb::error::ErrorKind>() = 296
It's not recommend to pass large object between function,
I think Error or ErrorKind should allocate in heap memory and return a reference on function return value type
`pubkind: ErrorKind` on mongodb::error::Error should change to `pubkind: Box<ErrorKind>`
It's not effective to transfer 320 bytes mongodb::error::Error on stack memory