You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
src/macros: Have labels! accept any type that implements Display
This allows (among other things) `histogram_opts!` to take the same kinds of
types as `opts!`. E.g. to replace this:
```rust
let status = String::from("200");
histogram_opts!(
...
labels! {"status".to_string() => status.clone()}
)
// Do more stuff with `status`.
```
with this:
```rust
let status = String::from("200");
histogram_opts!(
...
labels! {"status" => &status}
)
// Do more stuff with `status`.
```
And a lot more, such as using numbers or enums as label values directly.
Signed-off-by: Alin Sinpalean <[email protected]>
0 commit comments