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:
Terts Diepraam 2022-04-01 19:11:25 +02:00
parent af9f718936
commit c6c936f529
12 changed files with 0 additions and 13 deletions

View file

@ -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};

View file

@ -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;

View file

@ -29,7 +29,6 @@ mod prn_float;
mod prn_int;
use std::cmp;
use std::convert::TryFrom;
use crate::byteorder_io::*;
use crate::formatteriteminfo::*;

View file

@ -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;

View file

@ -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};

View file

@ -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};

View 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;

View file

@ -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};

View file

@ -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;

View file

@ -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()
}

View file

@ -5,7 +5,6 @@
// spell-checker:ignore (ToDO) hdsf ghead gtail
use std::convert::TryFrom;
use std::error::Error;
use std::fmt;

View file

@ -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) {