Closed elliottt closed 1 month ago
LGTM. Rust idiomatic q: I notice that SecretStores has
HashMap<String, SecretStore>
, is one placement of the Arc preferable to the other?
I think it depends on what the desired external use of the value is: putting the Arc
inside means that the value is clonable, while leaving it out means that the user of the type has more control over data indirection.
LGTM. Rust idiomatic q: I notice that SecretStores has
HashMap<String, SecretStore>
, is one placement of the Arc preferable to the other?
I don't know if I've detected a general law, and I don't think clippy has never directed me in one direction or another. I can say that my general rule is:
RwLock
and always will be RwLock
.Clone
and have my callers work it out.Thanks!
ObjectStores
internally is anArc
to anRwLock
, so the outerArc
present inSession
is not necessary. This PR removes that unnecessary indirection, asObjectStore
already derivesClone
.