mirror of
https://github.com/uutils/coreutils
synced 2024-07-21 18:04:45 +00:00
all: remove explicit imports of TryFrom and TryInto
This is enabled by the changing the edition from 2018 to 2021
This commit is contained in:
parent
af9f718936
commit
c6c936f529
|
@ -23,7 +23,6 @@ mod blocks;
|
|||
use blocks::conv_block_unblock_helper;
|
||||
|
||||
use std::cmp;
|
||||
use std::convert::TryInto;
|
||||
use std::env;
|
||||
use std::fs::{File, OpenOptions};
|
||||
use std::io::{self, Read, Seek, Write};
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
// spell-checker:ignore (vars) zlines BUFWRITER seekable
|
||||
|
||||
use clap::{crate_version, Arg, ArgMatches, Command};
|
||||
use std::convert::{TryFrom, TryInto};
|
||||
use std::ffi::OsString;
|
||||
use std::io::{self, BufWriter, ErrorKind, Read, Seek, SeekFrom, Write};
|
||||
use uucore::display::Quotable;
|
||||
|
|
|
@ -29,7 +29,6 @@ mod prn_float;
|
|||
mod prn_int;
|
||||
|
||||
use std::cmp;
|
||||
use std::convert::TryFrom;
|
||||
|
||||
use crate::byteorder_io::*;
|
||||
use crate::formatteriteminfo::*;
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
//!
|
||||
//! This module provides an implementation of [`FromStr`] for the
|
||||
//! [`PreciseNumber`] struct.
|
||||
use std::convert::TryInto;
|
||||
use std::str::FromStr;
|
||||
|
||||
use bigdecimal::BigDecimal;
|
||||
|
|
|
@ -33,7 +33,6 @@ use numeric_str_cmp::{human_numeric_str_cmp, numeric_str_cmp, NumInfo, NumInfoPa
|
|||
use rand::{thread_rng, Rng};
|
||||
use rayon::prelude::*;
|
||||
use std::cmp::Ordering;
|
||||
use std::convert::TryFrom;
|
||||
use std::env;
|
||||
use std::error::Error;
|
||||
use std::ffi::{OsStr, OsString};
|
||||
|
|
|
@ -14,7 +14,6 @@ mod platform;
|
|||
use crate::filenames::FilenameIterator;
|
||||
use crate::filenames::SuffixType;
|
||||
use clap::{crate_version, Arg, ArgMatches, Command};
|
||||
use std::convert::TryInto;
|
||||
use std::env;
|
||||
use std::fmt;
|
||||
use std::fs::{metadata, File};
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
extern crate uucore;
|
||||
|
||||
use clap::{crate_version, Arg, ArgMatches, Command};
|
||||
use std::convert::{TryFrom, TryInto};
|
||||
use std::fs::File;
|
||||
use std::io::{self, Write};
|
||||
use std::os::unix::process::ExitStatusExt;
|
||||
|
|
|
@ -22,7 +22,6 @@ use chunks::ReverseChunks;
|
|||
|
||||
use clap::{Arg, Command};
|
||||
use std::collections::VecDeque;
|
||||
use std::convert::TryInto;
|
||||
use std::ffi::OsString;
|
||||
use std::fmt;
|
||||
use std::fs::{File, Metadata};
|
||||
|
|
|
@ -41,7 +41,6 @@ use libc::{c_char, c_int, gid_t, uid_t};
|
|||
use libc::{getgrgid, getgrnam, getgroups};
|
||||
use libc::{getpwnam, getpwuid, group, passwd};
|
||||
|
||||
use std::convert::TryInto;
|
||||
use std::ffi::{CStr, CString};
|
||||
use std::io::Error as IOError;
|
||||
use std::io::ErrorKind;
|
||||
|
|
|
@ -99,8 +99,6 @@ impl FileInformation {
|
|||
pub fn file_size(&self) -> u64 {
|
||||
#[cfg(unix)]
|
||||
{
|
||||
use std::convert::TryInto;
|
||||
|
||||
assert!(self.0.st_size >= 0, "File size is negative");
|
||||
self.0.st_size.try_into().unwrap()
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
// spell-checker:ignore (ToDO) hdsf ghead gtail
|
||||
|
||||
use std::convert::TryFrom;
|
||||
use std::error::Error;
|
||||
use std::fmt;
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
use array_init::array_init;
|
||||
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion, Throughput};
|
||||
use std::convert::TryInto;
|
||||
use uu_factor::{table::*, Factors};
|
||||
|
||||
fn table(c: &mut Criterion) {
|
||||
|
|
Loading…
Reference in a new issue