commit 9ae9ba4fea477cdceafc1447c3eeba8de1c0ddd4
parent b654dc68ec6106a148ded3de027527145993728e
Author: William Casarin <jb55@jb55.com>
Date: Fri, 21 Mar 2025 15:06:51 -0700
Merge Take an iterator of &str in Filter::tags #38
Yuki Kishimoto (2):
Take an iterator of `&str` in `Filter::tags`
Remove `tracing-subscriber` dep
Diffstat:
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/Cargo.toml b/Cargo.toml
@@ -24,7 +24,6 @@ thiserror = "2.0.7"
futures = "0.3.31"
tokio = { version = "1", features = ["rt-multi-thread", "macros", "time"] }
tracing = "0.1.40"
-tracing-subscriber = "0.3.18"
[dev-dependencies]
hex = "0.4.3"
diff --git a/src/filter.rs b/src/filter.rs
@@ -524,13 +524,13 @@ impl FilterBuilder {
self
}
- pub fn tags<I>(mut self, tags: I, tag: char) -> Self
+ pub fn tags<'a, I>(mut self, tags: I, tag: char) -> Self
where
- I: IntoIterator<Item = String>,
+ I: IntoIterator<Item = &'a str>,
{
self.start_tag_field(tag).unwrap();
for tag in tags {
- self.add_str_element(&tag).unwrap();
+ self.add_str_element(tag).unwrap();
}
self.end_field();
self