Skip to content

Commit

Permalink
fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
tompro committed Jan 27, 2023
1 parent 29ee031 commit 4fa3bf0
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ impl ToRedisArgs for TsOptions {
{
if let Some(ref rt) = self.retention_time {
out.write_arg(b"RETENTION");
out.write_arg(format!("{}", rt).as_bytes());
out.write_arg(format!("{rt}").as_bytes());
}

if self.uncompressed {
Expand All @@ -496,7 +496,7 @@ impl ToRedisArgs for TsOptions {

if let Some(ref alloc) = self.chunk_size {
out.write_arg(b"CHUNK_SIZE");
out.write_arg(format!("{}", alloc).as_bytes());
out.write_arg(format!("{alloc}").as_bytes());
}

if let Some(ref l) = self.labels {
Expand Down Expand Up @@ -547,8 +547,8 @@ impl TsFilterOptions {
value: V,
) -> Self {
self.filters.push(TsFilter {
name: format!("{}", name),
value: format!("{}", value),
name: format!("{name}"),
value: format!("{value}"),
compare: TsCompare::Eq,
});
self
Expand All @@ -561,8 +561,8 @@ impl TsFilterOptions {
value: V,
) -> Self {
self.filters.push(TsFilter {
name: format!("{}", name),
value: format!("{}", value),
name: format!("{name}"),
value: format!("{value}"),
compare: TsCompare::NotEq,
});
self
Expand All @@ -578,12 +578,12 @@ impl TsFilterOptions {
"({})",
values
.iter()
.map(|v| { format!("{}", v) })
.map(|v| { format!("{v}") })
.collect::<Vec<String>>()
.join(",")
);
self.filters.push(TsFilter {
name: format!("{}", name),
name: format!("{name}"),
value: set,
compare: TsCompare::Eq,
});
Expand All @@ -600,12 +600,12 @@ impl TsFilterOptions {
"({})",
values
.iter()
.map(|v| { format!("{}", v) })
.map(|v| { format!("{v}") })
.collect::<Vec<String>>()
.join(",")
);
self.filters.push(TsFilter {
name: format!("{}", name),
name: format!("{name}"),
value: set,
compare: TsCompare::NotEq,
});
Expand All @@ -615,7 +615,7 @@ impl TsFilterOptions {
/// Select all time series that have the given label.
pub fn has_label<L: Display + ToRedisArgs>(mut self, name: L) -> Self {
self.filters.push(TsFilter {
name: format!("{}", name),
name: format!("{name}"),
value: "".to_string(),
compare: TsCompare::NotEq,
});
Expand All @@ -625,7 +625,7 @@ impl TsFilterOptions {
/// Select all time series that do not have the given label.
pub fn not_has_label<L: Display + ToRedisArgs>(mut self, name: L) -> Self {
self.filters.push(TsFilter {
name: format!("{}", name),
name: format!("{name}"),
value: "".to_string(),
compare: TsCompare::Eq,
});
Expand Down

0 comments on commit 4fa3bf0

Please sign in to comment.