Skip to content
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
SebRollen committed Jun 17, 2021
1 parent 7922987 commit b6d8ba1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ impl Client {
Ok(Self { socket })
}

pub async fn send<'a>(&self, metric: Metric<'a>) -> Result<(), Error> {
pub async fn send(&self, metric: Metric<'_>) -> Result<(), Error> {
let bytes = metric.into_bytes();
self.socket.send(&bytes).await?;
Ok(())
Expand Down
2 changes: 1 addition & 1 deletion src/metric.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ impl<'a> Metric<'a> {
}

while next_tag.is_some() {
let tag = next_tag.unwrap().into();
let tag = next_tag.unwrap();
match tag {
Tag::Single(value) => {
buf.extend_from_slice(value.as_bytes());
Expand Down
6 changes: 3 additions & 3 deletions src/tag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ impl<'a> From<(&'a str, &'a str)> for Tag<'a> {
}
}

impl<'a> Into<Cow<'a, str>> for Tag<'a> {
fn into(self) -> Cow<'a, str> {
match self {
impl<'a> From<Tag<'a>> for Cow<'a, str> {
fn from(tag: Tag<'a>) -> Cow<'a, str> {
match tag {
Tag::Single(single) => single,
Tag::KeyValue(key, value) => {
let mut out = key.to_string();
Expand Down

0 comments on commit b6d8ba1

Please sign in to comment.