Mercurial > hg-stable
changeset 49749:c7fb9b74e753
rust: remove newly redundant `use` statements with the 2021 edition prelude
https://doc.rust-lang.org/edition-guide/rust-2021/prelude.html
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Mon, 14 Nov 2022 15:20:48 +0100 |
parents | 1b6be761c23d |
children | 29cf3167e459 |
files | rust/hg-core/src/ancestors.rs rust/hg-core/src/dirstate/entry.rs rust/hg-core/src/dirstate/parsers.rs rust/hg-core/src/dirstate_tree/on_disk.rs rust/hg-core/src/dirstate_tree/status.rs rust/hg-core/src/matchers.rs rust/hg-core/src/revlog/index.rs rust/hg-core/src/revlog/node.rs rust/hg-core/src/revlog/revlog.rs rust/hg-core/src/utils/hg_path.rs rust/hg-cpython/src/conversion.rs rust/hg-cpython/src/dirstate/dirstate_map.rs rust/hg-cpython/src/utils.rs rust/rhg/src/commands/cat.rs |
diffstat | 14 files changed, 0 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- 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<G: Graph>( graph: G,
--- 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};
--- 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;
--- 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.
--- 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;
--- 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};
--- 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};
--- 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`
--- 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;
--- 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;
--- 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 ///
--- 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,
--- 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<PyObject> {
--- 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