From 1626762fe41927957b7f0227e0436c8ed01ccd17 Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Tue, 10 May 2022 21:46:45 +0900 Subject: [PATCH] Use the traits added to the Rust 2021 Edition prelude Follow up https://github.com/rust-lang/rust/pull/96861. This PR uses the traits added to the Rust 2021 Edition prelude. > The `TryInto`, `TryFrom` and `FromIterator` traits are now part of the prelude. https://doc.rust-lang.org/edition-guide/rust-2021/prelude.html --- crates/mdman/src/hbs.rs | 1 - src/cargo/core/compiler/fingerprint.rs | 1 - src/cargo/sources/registry/index.rs | 1 - tests/testsuite/dep_info.rs | 1 - 4 files changed, 4 deletions(-) diff --git a/crates/mdman/src/hbs.rs b/crates/mdman/src/hbs.rs index 022e696b8e3..81ad7ee458d 100644 --- a/crates/mdman/src/hbs.rs +++ b/crates/mdman/src/hbs.rs @@ -7,7 +7,6 @@ use handlebars::{ RenderContext, RenderError, Renderable, }; use std::collections::HashMap; -use std::convert::TryFrom; use std::path::Path; type FormatterRef<'a> = &'a (dyn Formatter + Send + Sync); diff --git a/src/cargo/core/compiler/fingerprint.rs b/src/cargo/core/compiler/fingerprint.rs index be8d060c73e..661bf0cd2a6 100644 --- a/src/cargo/core/compiler/fingerprint.rs +++ b/src/cargo/core/compiler/fingerprint.rs @@ -313,7 +313,6 @@ //! use std::collections::hash_map::{Entry, HashMap}; -use std::convert::TryInto; use std::env; use std::hash::{self, Hash, Hasher}; use std::io; diff --git a/src/cargo/sources/registry/index.rs b/src/cargo/sources/registry/index.rs index e7c8d220947..15c19990c44 100644 --- a/src/cargo/sources/registry/index.rs +++ b/src/cargo/sources/registry/index.rs @@ -76,7 +76,6 @@ use cargo_util::{paths, registry::make_dep_path}; use log::{debug, info}; use semver::Version; use std::collections::{HashMap, HashSet}; -use std::convert::TryInto; use std::fs; use std::io::ErrorKind; use std::path::Path; diff --git a/tests/testsuite/dep_info.rs b/tests/testsuite/dep_info.rs index ae385b13781..5893354aa0c 100644 --- a/tests/testsuite/dep_info.rs +++ b/tests/testsuite/dep_info.rs @@ -8,7 +8,6 @@ use cargo_test_support::{ basic_bin_manifest, basic_manifest, is_nightly, main_file, project, rustc_host, Project, }; use filetime::FileTime; -use std::convert::TryInto; use std::fs; use std::path::Path; use std::str;