Skip to content

Commit 5b651d8

Browse files
committed
Address Clippy warning about using from_iter instead of collect.
1 parent 558cdf4 commit 5b651d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/web/rustdoc.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ mod test {
656656
use crate::test::*;
657657
use kuchiki::traits::TendrilSink;
658658
use reqwest::StatusCode;
659-
use std::{collections::BTreeMap, iter::FromIterator};
659+
use std::collections::BTreeMap;
660660

661661
fn try_latest_version_redirect(
662662
path: &str,
@@ -1175,7 +1175,7 @@ mod test {
11751175
path: &str,
11761176
links: &[(&str, &str)],
11771177
) -> Result<(), failure::Error> {
1178-
let mut links = BTreeMap::from_iter(links.iter().copied());
1178+
let mut links: BTreeMap<&str, &str> = links.iter().copied().collect();
11791179

11801180
for (platform, link, rel) in get_platform_links(path, web)? {
11811181
assert_eq!(rel, "nofollow");

0 commit comments

Comments
 (0)