From 45eeb69bda7baa0b525a3628d5fa3767c47a88de Mon Sep 17 00:00:00 2001 From: Beefki Date: Thu, 26 Oct 2017 00:34:04 -0500 Subject: [PATCH] Not heap allocating an Error anymore --- src/packagemanager.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/packagemanager.rs b/src/packagemanager.rs index 3abb075..74a4919 100644 --- a/src/packagemanager.rs +++ b/src/packagemanager.rs @@ -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>(ruxconf: P) -> Result, Box> { +pub fn read_default<'a, P: AsRef>(ruxconf: P) -> Result, std::io::Error> { /* let mut home = env::home_dir().unwrap_or_else(|| { eprintln!("Cannot load file, home directory cannot be found");