rust_sql_organizer/sql_file/
error.rs

1use std::fmt::Display;
2
3#[derive(Debug)]
4pub enum Error {
5    IoError(std::io::Error),
6}
7
8impl From<std::io::Error> for Error {
9    fn from(value: std::io::Error) -> Self {
10        Self::IoError(value)
11    }
12}
13
14impl Display for Error {
15    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16        match self {
17            Self::IoError(e) => e.fmt(f),
18        }
19    }
20}
21
22impl std::error::Error for Error {}