fix: optimize imports

This commit is contained in:
Strix 2023-10-14 22:39:48 +02:00
parent 11317787f6
commit 7c2f637184
No known key found for this signature in database
GPG key ID: 49B2E37B8915B774
7 changed files with 18 additions and 12 deletions

View file

@ -1,11 +1,11 @@
use crate::package::identifier::PackageIdentifier; use std::process::exit;
use crate::package::Package;
use clap::{Parser, Subcommand}; use clap::{Parser, Subcommand};
use log::{debug, error, info, trace, warn}; use log::{debug, error, info, trace, warn};
use std::process::exit;
use crate::CONFIG; use crate::CONFIG;
use crate::package::identifier::PackageIdentifier;
use crate::package::Package;
use crate::process::Process; use crate::process::Process;
use crate::types::fetch::TryFetch; use crate::types::fetch::TryFetch;

View file

@ -1,7 +1,8 @@
use std::env;
use colored::Colorize; use colored::Colorize;
use fern::Dispatch; use fern::Dispatch;
use log::{Record, SetLoggerError}; use log::{Record, SetLoggerError};
use std::env;
fn format_regular<S: Into<String>>(log: S, record: &Record) -> String { fn format_regular<S: Into<String>>(log: S, record: &Record) -> String {
let log = log.into(); let log = log.into();

View file

@ -1,9 +1,8 @@
use crate::commands::Cli;
use clap::Parser; use clap::Parser;
use log::trace; use log::trace;
use crate::commands::Cli;
mod commands; mod commands;
mod logging; mod logging;
mod package; mod package;

View file

@ -1,13 +1,15 @@
use crate::tmpfs::TempDir; use std::process::exit;
use errors::{BinError, BuildError, InstallError};
use log::{debug, error, info, trace}; use log::{debug, error, info, trace};
use errors::{BinError, BuildError, InstallError};
use manifest::Manifest; use manifest::Manifest;
use pkgfile::PKGFile; use pkgfile::PKGFile;
use std::process::exit;
use crate::CONFIG; use crate::CONFIG;
use crate::package::identifier::{PackageIdentifier, PackageLocator}; use crate::package::identifier::{PackageIdentifier, PackageLocator};
use crate::package::Package; use crate::package::Package;
use crate::tmpfs::TempDir;
use crate::types::fetch::TryFetch; use crate::types::fetch::TryFetch;
pub mod errors; pub mod errors;

View file

@ -1,8 +1,11 @@
use std::fmt::Display; use std::fmt::Display;
use std::path::Path; use std::path::Path;
use log::{info, trace};
use log::info;
use reqwest::blocking::get; use reqwest::blocking::get;
use pkgfile::PKGFile; use pkgfile::PKGFile;
use crate::package::identifier::PackageIdentifier; use crate::package::identifier::PackageIdentifier;
use crate::types::fetch::TryFetch; use crate::types::fetch::TryFetch;

View file

@ -1,7 +1,7 @@
use std::io::{BufRead, BufReader}; use std::io::{BufRead, BufReader};
use std::process::Command; use std::process::Command;
use log::{info, trace};
use log::{info, trace};
pub struct Process { pub struct Process {
pub command: Vec<String>, pub command: Vec<String>,

View file

@ -1,4 +1,5 @@
use std::path::PathBuf; use std::path::PathBuf;
use crate::CONFIG; use crate::CONFIG;
pub struct TempDir { pub struct TempDir {