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

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