# HG changeset patch # User Raphaël Gomès # Date 1668435648 -3600 # Node ID c7fb9b74e753bab28499813f801991a9c7f9f28c # Parent 1b6be761c23d2064c4e8d73ccf796be5b9102adf rust: remove newly redundant `use` statements with the 2021 edition prelude https://doc.rust-lang.org/edition-guide/rust-2021/prelude.html diff -r 1b6be761c23d -r c7fb9b74e753 rust/hg-core/src/ancestors.rs --- a/rust/hg-core/src/ancestors.rs Mon Nov 14 15:19:27 2022 +0100 +++ b/rust/hg-core/src/ancestors.rs Mon Nov 14 15:20:48 2022 +0100 @@ -357,7 +357,6 @@ use super::*; use crate::testing::{SampleGraph, VecGraph}; - use std::iter::FromIterator; fn list_ancestors( graph: G, diff -r 1b6be761c23d -r c7fb9b74e753 rust/hg-core/src/dirstate/entry.rs --- a/rust/hg-core/src/dirstate/entry.rs Mon Nov 14 15:19:27 2022 +0100 +++ b/rust/hg-core/src/dirstate/entry.rs Mon Nov 14 15:20:48 2022 +0100 @@ -1,7 +1,6 @@ use crate::dirstate_tree::on_disk::DirstateV2ParseError; use crate::errors::HgError; use bitflags::bitflags; -use std::convert::{TryFrom, TryInto}; use std::fs; use std::io; use std::time::{SystemTime, UNIX_EPOCH}; diff -r 1b6be761c23d -r c7fb9b74e753 rust/hg-core/src/dirstate/parsers.rs --- a/rust/hg-core/src/dirstate/parsers.rs Mon Nov 14 15:19:27 2022 +0100 +++ b/rust/hg-core/src/dirstate/parsers.rs Mon Nov 14 15:20:48 2022 +0100 @@ -9,7 +9,6 @@ use byteorder::{BigEndian, WriteBytesExt}; use bytes_cast::{unaligned, BytesCast}; use micro_timer::timed; -use std::convert::TryFrom; /// Parents are stored in the dirstate as byte hashes. pub const PARENT_SIZE: usize = 20; diff -r 1b6be761c23d -r c7fb9b74e753 rust/hg-core/src/dirstate_tree/on_disk.rs --- a/rust/hg-core/src/dirstate_tree/on_disk.rs Mon Nov 14 15:19:27 2022 +0100 +++ b/rust/hg-core/src/dirstate_tree/on_disk.rs Mon Nov 14 15:20:48 2022 +0100 @@ -17,7 +17,6 @@ use format_bytes::format_bytes; use rand::Rng; use std::borrow::Cow; -use std::convert::{TryFrom, TryInto}; use std::fmt::Write; /// Added at the start of `.hg/dirstate` when the "v2" format is used. diff -r 1b6be761c23d -r c7fb9b74e753 rust/hg-core/src/dirstate_tree/status.rs --- a/rust/hg-core/src/dirstate_tree/status.rs Mon Nov 14 15:19:27 2022 +0100 +++ b/rust/hg-core/src/dirstate_tree/status.rs Mon Nov 14 15:20:48 2022 +0100 @@ -24,8 +24,6 @@ use rayon::prelude::*; use sha1::{Digest, Sha1}; use std::borrow::Cow; -use std::convert::TryFrom; -use std::convert::TryInto; use std::io; use std::path::Path; use std::path::PathBuf; diff -r 1b6be761c23d -r c7fb9b74e753 rust/hg-core/src/matchers.rs --- a/rust/hg-core/src/matchers.rs Mon Nov 14 15:19:27 2022 +0100 +++ b/rust/hg-core/src/matchers.rs Mon Nov 14 15:20:48 2022 +0100 @@ -27,7 +27,6 @@ use std::borrow::ToOwned; use std::collections::HashSet; use std::fmt::{Display, Error, Formatter}; -use std::iter::FromIterator; use std::ops::Deref; use std::path::{Path, PathBuf}; diff -r 1b6be761c23d -r c7fb9b74e753 rust/hg-core/src/revlog/index.rs --- a/rust/hg-core/src/revlog/index.rs Mon Nov 14 15:19:27 2022 +0100 +++ b/rust/hg-core/src/revlog/index.rs Mon Nov 14 15:20:48 2022 +0100 @@ -1,4 +1,3 @@ -use std::convert::TryInto; use std::ops::Deref; use byteorder::{BigEndian, ByteOrder}; diff -r 1b6be761c23d -r c7fb9b74e753 rust/hg-core/src/revlog/node.rs --- a/rust/hg-core/src/revlog/node.rs Mon Nov 14 15:19:27 2022 +0100 +++ b/rust/hg-core/src/revlog/node.rs Mon Nov 14 15:20:48 2022 +0100 @@ -10,7 +10,6 @@ use crate::errors::HgError; use bytes_cast::BytesCast; -use std::convert::{TryFrom, TryInto}; use std::fmt; /// The length in bytes of a `Node` diff -r 1b6be761c23d -r c7fb9b74e753 rust/hg-core/src/revlog/revlog.rs --- a/rust/hg-core/src/revlog/revlog.rs Mon Nov 14 15:19:27 2022 +0100 +++ b/rust/hg-core/src/revlog/revlog.rs Mon Nov 14 15:20:48 2022 +0100 @@ -1,5 +1,4 @@ use std::borrow::Cow; -use std::convert::TryFrom; use std::io::Read; use std::ops::Deref; use std::path::Path; diff -r 1b6be761c23d -r c7fb9b74e753 rust/hg-core/src/utils/hg_path.rs --- a/rust/hg-core/src/utils/hg_path.rs Mon Nov 14 15:19:27 2022 +0100 +++ b/rust/hg-core/src/utils/hg_path.rs Mon Nov 14 15:20:48 2022 +0100 @@ -8,7 +8,6 @@ use crate::utils::SliceExt; use std::borrow::Borrow; use std::borrow::Cow; -use std::convert::TryFrom; use std::ffi::{OsStr, OsString}; use std::fmt; use std::ops::Deref; diff -r 1b6be761c23d -r c7fb9b74e753 rust/hg-cpython/src/conversion.rs --- a/rust/hg-cpython/src/conversion.rs Mon Nov 14 15:19:27 2022 +0100 +++ b/rust/hg-cpython/src/conversion.rs Mon Nov 14 15:20:48 2022 +0100 @@ -10,7 +10,6 @@ use cpython::{ObjectProtocol, PyObject, PyResult, Python}; use hg::Revision; -use std::iter::FromIterator; /// Utility function to convert a Python iterable into various collections /// diff -r 1b6be761c23d -r c7fb9b74e753 rust/hg-cpython/src/dirstate/dirstate_map.rs --- a/rust/hg-cpython/src/dirstate/dirstate_map.rs Mon Nov 14 15:19:27 2022 +0100 +++ b/rust/hg-cpython/src/dirstate/dirstate_map.rs Mon Nov 14 15:20:48 2022 +0100 @@ -9,7 +9,6 @@ //! `hg-core` package. use std::cell::{RefCell, RefMut}; -use std::convert::TryInto; use cpython::{ exc, PyBool, PyBytes, PyClone, PyDict, PyErr, PyList, PyNone, PyObject, diff -r 1b6be761c23d -r c7fb9b74e753 rust/hg-cpython/src/utils.rs --- a/rust/hg-cpython/src/utils.rs Mon Nov 14 15:19:27 2022 +0100 +++ b/rust/hg-cpython/src/utils.rs Mon Nov 14 15:20:48 2022 +0100 @@ -1,7 +1,6 @@ use cpython::exc::ValueError; use cpython::{PyBytes, PyDict, PyErr, PyObject, PyResult, PyTuple, Python}; use hg::revlog::Node; -use std::convert::TryFrom; #[allow(unused)] pub fn print_python_trace(py: Python) -> PyResult { diff -r 1b6be761c23d -r c7fb9b74e753 rust/rhg/src/commands/cat.rs --- a/rust/rhg/src/commands/cat.rs Mon Nov 14 15:19:27 2022 +0100 +++ b/rust/rhg/src/commands/cat.rs Mon Nov 14 15:20:48 2022 +0100 @@ -4,7 +4,6 @@ use hg::operations::cat; use hg::utils::hg_path::HgPathBuf; use micro_timer::timed; -use std::convert::TryFrom; pub const HELP_TEXT: &str = " Output the current or given revision of files