Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add collection id/name caching at the pool level #36

Merged
merged 1 commit into from
Sep 24, 2018
Merged

Conversation

pjenvey
Copy link
Member

@pjenvey pjenvey commented Sep 21, 2018

and a couple more db calls that utilize it

Issue #18

and a couple more db calls that utilize it

Issue #18
@@ -65,7 +65,7 @@ impl Server {
let state = ServerState {
// TODO: replace MockDb with a real implementation
db: Box::new(MockDb::new()),
secrets: secrets.clone(),
secrets: Arc::clone(&secrets),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Purely for my own education, I'm curious about this change.

Was secrets.clone() not doing what I thought it was before, or is this about code style, or is there some other underlying difference between the two?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This became the idiomatic way of calling smart pointer methods last year rust-lang/rust#42137 -- intention was to clarify you're calling the typically cheap smart pointer clone vs a potentially heavier inner clone operation

@pjenvey pjenvey merged commit a165838 into master Sep 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants