-
Notifications
You must be signed in to change notification settings - Fork 158
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
Add blanket implementations of Recorder
for some pointer-like types
#507
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one small nit to have the code be a little more idiomatic.
T: Recorder, | ||
{ | ||
fn describe_counter(&self, key: KeyName, unit: Option<Unit>, description: SharedString) { | ||
Deref::deref(self).describe_counter(key, unit, description) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be able to just do (**self)
, or even self.as_ref()
, which I think are both a bit more idiomatic than Deref::deref(self)
. Dealer's choice on which one you choose... but just not Deref::deref(self)
. 😂
Closing in favor of #512. (explanation is in the new PR) |
Rc
,Arc
, andBox
.Closes #506.