Not heap allocating an Error anymore
This commit is contained in:
parent
df54495c20
commit
45eeb69bda
@ -4,7 +4,6 @@ use std::io::prelude::*;
|
||||
use std::fs::{self, File};
|
||||
use std::env;
|
||||
use super::std;
|
||||
use std::error::Error;
|
||||
|
||||
/// Creates a `PackageManager` struct to hold in the needed data
|
||||
/// to run our commands.
|
||||
@ -119,7 +118,7 @@ impl<'a> PackageManager<'a> {
|
||||
/// Pulls the first line out of the default.conf and loads that.
|
||||
/// If it doesn't recognize the file it will tell the user that there's an
|
||||
/// issue before exiting.
|
||||
pub fn read_default<'a, P: AsRef<Path>>(ruxconf: P) -> Result<PackageManager<'a>, Box<Error>> {
|
||||
pub fn read_default<'a, P: AsRef<Path>>(ruxconf: P) -> Result<PackageManager<'a>, std::io::Error> {
|
||||
/*
|
||||
let mut home = env::home_dir().unwrap_or_else(|| {
|
||||
eprintln!("Cannot load file, home directory cannot be found");
|
||||
|
Loading…
x
Reference in New Issue
Block a user