2023-11-03 22:40:19 +01:00
|
|
|
use std::io;
|
|
|
|
|
|
|
|
mod law;
|
|
|
|
|
|
|
|
pub struct Error {
|
|
|
|
msg: String,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl From<ureq::Error> for Error {
|
|
|
|
fn from(value: ureq::Error) -> Self {
|
|
|
|
Self {
|
|
|
|
msg: value.to_string(),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
impl From<io::Error> for Error {
|
|
|
|
fn from(value: io::Error) -> Self {
|
|
|
|
Self {
|
|
|
|
msg: value.to_string(),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-11-04 00:05:38 +01:00
|
|
|
impl From<serde_json::Error> for Error {
|
|
|
|
fn from(value: serde_json::Error) -> Self {
|
|
|
|
Self {
|
|
|
|
msg: value.to_string(),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-11-03 22:40:19 +01:00
|
|
|
|
2023-11-03 13:45:25 +01:00
|
|
|
fn main() {
|
2023-11-03 22:40:19 +01:00
|
|
|
law::parse(10001905);
|
2023-11-03 13:45:25 +01:00
|
|
|
}
|