Fix a couple of new clippy warnings

This commit is contained in:
Sebastian Dröge 2021-12-02 22:39:57 +02:00
parent 7d968d78bb
commit 7cc1523e7d
2 changed files with 4 additions and 4 deletions

View file

@ -31,7 +31,7 @@ fn print_tags(info: &DiscovererInfo) {
let tags = info.tags();
match tags {
Some(taglist) => {
println!(" {}", taglist.to_string()); // FIXME use an iterator
println!(" {}", taglist); // FIXME use an iterator
}
None => {
println!(" no tags");

View file

@ -108,7 +108,7 @@ fn example_main() {
println!("\nReceived toc: {:?} - updated: {}", toc.scope(), updated);
// Get a list of tags that are ToC specific.
if let Some(tags) = toc.tags() {
println!("- tags: {}", tags.to_string());
println!("- tags: {}", tags);
}
// ToCs do not have a fixed structure. Depending on the format that
// they were parsed from, they might have different tree-like structures,
@ -127,7 +127,7 @@ fn example_main() {
}
// Every ToC entry can have tags to it.
if let Some(tags) = toc_entry.tags() {
println!("\t- tags: {}", tags.to_string());
println!("\t- tags: {}", tags);
}
// Every ToC entry can have a set of child entries.
// With this structure, you can create trees of arbitrary depth.
@ -141,7 +141,7 @@ fn example_main() {
println!("\t\t- start: {}, stop: {}", start, stop);
}
if let Some(tags) = toc_sub_entry.tags() {
println!("\t\t- tags: {:?}", tags.to_string());
println!("\t\t- tags: {}", tags);
}
}
}