runtime: small code simplification

This commit is contained in:
Toby Lawrence 2019-07-21 11:52:57 -04:00
parent e614847de6
commit 66ba3056a7
No known key found for this signature in database
GPG Key ID: 3BB201B0EEE9212E
1 changed files with 3 additions and 6 deletions

View File

@ -385,8 +385,7 @@ impl Sink {
N: Into<ScopedString>,
L: IntoLabels,
{
let key = self.construct_key((name, labels));
self.get_owned_value_handle(key, Kind::Counter).into()
self.counter((name, labels))
}
/// Creates a handle to the given gauge.
@ -438,8 +437,7 @@ impl Sink {
N: Into<ScopedString>,
L: IntoLabels,
{
let key = self.construct_key((name, labels));
self.get_owned_value_handle(key, Kind::Gauge).into()
self.gauge((name, labels))
}
/// Creates a handle to the given histogram.
@ -511,8 +509,7 @@ impl Sink {
N: Into<ScopedString>,
L: IntoLabels,
{
let key = self.construct_key((name, labels));
self.get_owned_value_handle(key, Kind::Histogram).into()
self.histogram((name, labels))
}
pub(crate) fn construct_key<K>(&self, key: K) -> Key