Yoda 0.10.8

Browser for Gemini Protocol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::fmt::{Display, Formatter, Result};

#[derive(Debug)]
pub enum Error {
    Overwrite(String),
    Unexpected,
}

impl Display for Error {
    fn fmt(&self, f: &mut Formatter) -> Result {
        match self {
            Self::Overwrite(key) => {
                write!(f, "Overwrite attempt for existing record `{key}`")
            }
            Self::Unexpected => write!(f, "Unexpected error"),
        }
    }
}