##// END OF EJS Templates
rust: remove newly redundant `use` statements with the 2021 edition prelude...
Raphaël Gomès -
r50525:c7fb9b74 default
parent child Browse files
Show More
@@ -357,7 +357,6 b' mod tests {'
357
357
358 use super::*;
358 use super::*;
359 use crate::testing::{SampleGraph, VecGraph};
359 use crate::testing::{SampleGraph, VecGraph};
360 use std::iter::FromIterator;
361
360
362 fn list_ancestors<G: Graph>(
361 fn list_ancestors<G: Graph>(
363 graph: G,
362 graph: G,
@@ -1,7 +1,6 b''
1 use crate::dirstate_tree::on_disk::DirstateV2ParseError;
1 use crate::dirstate_tree::on_disk::DirstateV2ParseError;
2 use crate::errors::HgError;
2 use crate::errors::HgError;
3 use bitflags::bitflags;
3 use bitflags::bitflags;
4 use std::convert::{TryFrom, TryInto};
5 use std::fs;
4 use std::fs;
6 use std::io;
5 use std::io;
7 use std::time::{SystemTime, UNIX_EPOCH};
6 use std::time::{SystemTime, UNIX_EPOCH};
@@ -9,7 +9,6 b' use crate::{dirstate::EntryState, Dirsta'
9 use byteorder::{BigEndian, WriteBytesExt};
9 use byteorder::{BigEndian, WriteBytesExt};
10 use bytes_cast::{unaligned, BytesCast};
10 use bytes_cast::{unaligned, BytesCast};
11 use micro_timer::timed;
11 use micro_timer::timed;
12 use std::convert::TryFrom;
13
12
14 /// Parents are stored in the dirstate as byte hashes.
13 /// Parents are stored in the dirstate as byte hashes.
15 pub const PARENT_SIZE: usize = 20;
14 pub const PARENT_SIZE: usize = 20;
@@ -17,7 +17,6 b' use bytes_cast::BytesCast;'
17 use format_bytes::format_bytes;
17 use format_bytes::format_bytes;
18 use rand::Rng;
18 use rand::Rng;
19 use std::borrow::Cow;
19 use std::borrow::Cow;
20 use std::convert::{TryFrom, TryInto};
21 use std::fmt::Write;
20 use std::fmt::Write;
22
21
23 /// Added at the start of `.hg/dirstate` when the "v2" format is used.
22 /// Added at the start of `.hg/dirstate` when the "v2" format is used.
@@ -24,8 +24,6 b' use once_cell::sync::OnceCell;'
24 use rayon::prelude::*;
24 use rayon::prelude::*;
25 use sha1::{Digest, Sha1};
25 use sha1::{Digest, Sha1};
26 use std::borrow::Cow;
26 use std::borrow::Cow;
27 use std::convert::TryFrom;
28 use std::convert::TryInto;
29 use std::io;
27 use std::io;
30 use std::path::Path;
28 use std::path::Path;
31 use std::path::PathBuf;
29 use std::path::PathBuf;
@@ -27,7 +27,6 b' use crate::filepatterns::normalize_path_'
27 use std::borrow::ToOwned;
27 use std::borrow::ToOwned;
28 use std::collections::HashSet;
28 use std::collections::HashSet;
29 use std::fmt::{Display, Error, Formatter};
29 use std::fmt::{Display, Error, Formatter};
30 use std::iter::FromIterator;
31 use std::ops::Deref;
30 use std::ops::Deref;
32 use std::path::{Path, PathBuf};
31 use std::path::{Path, PathBuf};
33
32
@@ -1,4 +1,3 b''
1 use std::convert::TryInto;
2 use std::ops::Deref;
1 use std::ops::Deref;
3
2
4 use byteorder::{BigEndian, ByteOrder};
3 use byteorder::{BigEndian, ByteOrder};
@@ -10,7 +10,6 b''
10
10
11 use crate::errors::HgError;
11 use crate::errors::HgError;
12 use bytes_cast::BytesCast;
12 use bytes_cast::BytesCast;
13 use std::convert::{TryFrom, TryInto};
14 use std::fmt;
13 use std::fmt;
15
14
16 /// The length in bytes of a `Node`
15 /// The length in bytes of a `Node`
@@ -1,5 +1,4 b''
1 use std::borrow::Cow;
1 use std::borrow::Cow;
2 use std::convert::TryFrom;
3 use std::io::Read;
2 use std::io::Read;
4 use std::ops::Deref;
3 use std::ops::Deref;
5 use std::path::Path;
4 use std::path::Path;
@@ -8,7 +8,6 b''
8 use crate::utils::SliceExt;
8 use crate::utils::SliceExt;
9 use std::borrow::Borrow;
9 use std::borrow::Borrow;
10 use std::borrow::Cow;
10 use std::borrow::Cow;
11 use std::convert::TryFrom;
12 use std::ffi::{OsStr, OsString};
11 use std::ffi::{OsStr, OsString};
13 use std::fmt;
12 use std::fmt;
14 use std::ops::Deref;
13 use std::ops::Deref;
@@ -10,7 +10,6 b''
10
10
11 use cpython::{ObjectProtocol, PyObject, PyResult, Python};
11 use cpython::{ObjectProtocol, PyObject, PyResult, Python};
12 use hg::Revision;
12 use hg::Revision;
13 use std::iter::FromIterator;
14
13
15 /// Utility function to convert a Python iterable into various collections
14 /// Utility function to convert a Python iterable into various collections
16 ///
15 ///
@@ -9,7 +9,6 b''
9 //! `hg-core` package.
9 //! `hg-core` package.
10
10
11 use std::cell::{RefCell, RefMut};
11 use std::cell::{RefCell, RefMut};
12 use std::convert::TryInto;
13
12
14 use cpython::{
13 use cpython::{
15 exc, PyBool, PyBytes, PyClone, PyDict, PyErr, PyList, PyNone, PyObject,
14 exc, PyBool, PyBytes, PyClone, PyDict, PyErr, PyList, PyNone, PyObject,
@@ -1,7 +1,6 b''
1 use cpython::exc::ValueError;
1 use cpython::exc::ValueError;
2 use cpython::{PyBytes, PyDict, PyErr, PyObject, PyResult, PyTuple, Python};
2 use cpython::{PyBytes, PyDict, PyErr, PyObject, PyResult, PyTuple, Python};
3 use hg::revlog::Node;
3 use hg::revlog::Node;
4 use std::convert::TryFrom;
5
4
6 #[allow(unused)]
5 #[allow(unused)]
7 pub fn print_python_trace(py: Python) -> PyResult<PyObject> {
6 pub fn print_python_trace(py: Python) -> PyResult<PyObject> {
@@ -4,7 +4,6 b' use format_bytes::format_bytes;'
4 use hg::operations::cat;
4 use hg::operations::cat;
5 use hg::utils::hg_path::HgPathBuf;
5 use hg::utils::hg_path::HgPathBuf;
6 use micro_timer::timed;
6 use micro_timer::timed;
7 use std::convert::TryFrom;
8
7
9 pub const HELP_TEXT: &str = "
8 pub const HELP_TEXT: &str = "
10 Output the current or given revision of files
9 Output the current or given revision of files
General Comments 0
You need to be logged in to leave comments. Login now