fix: cargo fix

This commit is contained in:
Strix 2023-10-14 22:39:46 +02:00
parent f4f83f9fa7
commit 4626533269
No known key found for this signature in database
GPG key ID: 49B2E37B8915B774
5 changed files with 13 additions and 13 deletions

View file

@ -1,9 +1,9 @@
use crate::package::identifier::PackageIdentifier;
use crate::package::installer::{InstallType, PackageInstaller};
use crate::package::Package;
use clap::{Parser, Subcommand};
use log::{debug, error, info, trace, warn};
use manifest::Manifest;
use std::process::exit;
use crate::CONFIG;
use crate::process::Process;
@ -54,7 +54,7 @@ impl Command {
warn!("Installer does not run in isolation.");
let start = std::time::Instant::now();
let unix_start = std::time::SystemTime::now()
let _unix_start = std::time::SystemTime::now()
.duration_since(std::time::UNIX_EPOCH)
.unwrap();
@ -80,7 +80,7 @@ impl Command {
}
let end = std::time::Instant::now();
let unix_end = std::time::SystemTime::now()
let _unix_end = std::time::SystemTime::now()
.duration_since(std::time::UNIX_EPOCH)
.unwrap();
@ -117,7 +117,7 @@ impl Command {
Process::command(vec!["sh", "-c", "echo whoami: $(whoami)"])
.spawn()
.unwrap();
if let Ok(user) = std::env::var("SUDO_USER") {
if let Ok(_user) = std::env::var("SUDO_USER") {
Process::command(vec!["sh", "-c", "echo sudo_user: $SUDO_USER"])
.spawn()
.unwrap();

View file

@ -28,7 +28,7 @@ fn format_regular<S: Into<String>>(log: S, record: &Record) -> String {
let mut lines = log.lines().peekable();
let mut output = match lines.peek() {
Some(line) => line_prefix(lines.next().unwrap().to_string(), false),
Some(_line) => line_prefix(lines.next().unwrap().to_string(), false),
None => return "".to_string(),
};

View file

@ -1,9 +1,9 @@
use crate::commands::Cli;
use crate::process::Process;
use clap::Parser;
use colored::Colorize;
use log::trace;
use std::process::Command;
mod commands;
mod logging;

View file

@ -34,7 +34,7 @@ pub fn fetch_by_uri<S: Into<String>>(uri: S) -> Result<PKGFile, FetchError> {
// get file contents as bytes
let mut bytes = Vec::new();
match get(uri.into()) {
Ok(mut response) => {
Ok(response) => {
match response.take(1024 * 1024).read_to_end(&mut bytes) {
Ok(_) => (),
Err(e) => return Err(FetchError::IOError(e)),
@ -45,11 +45,11 @@ pub fn fetch_by_uri<S: Into<String>>(uri: S) -> Result<PKGFile, FetchError> {
// parse bytes as PKGFile
match PKGFile::try_from(bytes) {
Ok(pkgfile) => Ok(pkgfile),
Err(e) => Err(FetchError::ParseError),
Err(_e) => Err(FetchError::ParseError),
}
}
pub fn fetch_by_package_locator(package_locator: PackageLocator) -> Result<PKGFile, FetchError> {
pub fn fetch_by_package_locator(_package_locator: PackageLocator) -> Result<PKGFile, FetchError> {
// TODO: search index for package locator
Ok(PKGFile::default())
}

View file

@ -3,7 +3,7 @@ use errors::{BinError, BuildError, InstallError};
use log::{debug, error, info, trace};
use manifest::Manifest;
use pkgfile::PKGFile;
use std::fmt::Display;
use std::process::exit;
use crate::CONFIG;
use crate::package::identifier::{PackageIdentifier, PackageLocator};