Skip to content

Commit 9baf88c

Browse files
authored
feat(encoding): make decoder clone (#67)
## Description All fields of the decoder are already clone, and I have a use case where I'd like to clone the decoder. ## Breaking Changes <!-- Optional, if there are any breaking changes document them, including how to migrate older code. --> ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR. --> ## Change checklist - [ ] Self-review. - [ ] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant. - [ ] Tests if relevant. - [ ] All breaking changes documented.
1 parent b8f1876 commit 9baf88c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/encoding.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ impl Item<'_> {
230230
/// Decoder for metrics received from an [`Encoder`]
231231
///
232232
/// Implements [`MetricsSource`] to export the decoded metrics to OpenMetrics.
233-
#[derive(Debug, Default)]
233+
#[derive(Debug, Clone, Default)]
234234
pub struct Decoder {
235235
schema: Option<Schema>,
236236
values: Values,

0 commit comments

Comments
 (0)