-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Description
Cow in Rust is mainly used for strings. Arc is trivially cloneable on the other hand, so it makes no sense to have sometimes Arc, sometimes &Arc.
Line 59 in fdd105d
| env: Cow<'e, Arc<EnvInner>>, |
This Cow pollutes RoTxnInner, RoTxn and all other code using those structs with lifetimes.
I suggest changing this
struct RoTxnInner<'e> {
/// Makes the struct covariant and !Sync
pub(crate) txn: Option<NonNull<ffi::MDB_txn>>,
env: Cow<'e, Arc<EnvInner>>,
}to this
struct RoTxnInner {
/// Makes the struct covariant and !Sync
pub(crate) txn: Option<NonNull<ffi::MDB_txn>>,
env: Arc<EnvInner>,
}Metadata
Metadata
Assignees
Labels
No labels