location-parser 0.1.0

Parses latitude/longitude from strings in a wide variety of formats.
Documentation
use std::error;
use std::fmt;

#[derive(Debug, PartialEq)]
pub enum Error {
    InvalidFormat,
    OutOfRange,
}

impl fmt::Display for Error {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        let s = match self {
            Error::InvalidFormat => "Invalid format",
            Error::OutOfRange => "Out of range",
        };
        f.write_str(s)
    }
}

impl error::Error for Error {}