1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
use crate::pack; use quick_error::quick_error; use std::io; quick_error! { #[derive(Debug)] pub enum Error { Io(err: io::Error) { display("An IO error occurred when reading the pack or creating a temporary file") from() source(err) } PackIter(err: pack::data::iter::Error) { display("Pack iteration failed") from() source(err) } PeristError(err: tempfile::PersistError) { display("Could not move a temporary file into its desired place") from() source(err) } IndexWrite(err: pack::index::write::Error) { display("The index file could not be written") from() source(err) } } }