Skip to content

Commit f44caa5

Browse files
authored
fix doc for encode (#433)
Signed-off-by: Han Xu <[email protected]>
1 parent 6cfacdd commit f44caa5

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/encoder/mod.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,11 @@ use crate::proto::MetricFamily;
1616
/// An interface for encoding metric families into an underlying wire protocol.
1717
pub trait Encoder {
1818
/// `encode` converts a slice of MetricFamily proto messages into target
19-
/// format and writes the resulting lines to `writer`. It returns the number
20-
/// of bytes written and any error encountered. This function does not
21-
/// perform checks on the content of the metric and label names,
22-
/// i.e. invalid metric or label names will result in invalid text format
19+
/// format and writes the resulting lines to `writer`. This function does not
20+
/// perform checks on the content of the metrics and label names,
21+
/// i.e. invalid metrics or label names will result in invalid text format
2322
/// output.
24-
fn encode<W: Write>(&self, _: &[MetricFamily], _: &mut W) -> Result<()>;
23+
fn encode<W: Write>(&self, mfs: &[MetricFamily], writer: &mut W) -> Result<()>;
2524

2625
/// `format_type` returns target format.
2726
fn format_type(&self) -> &str;

0 commit comments

Comments
 (0)