// TODO fix with documentation #![allow(clippy::missing_errors_doc)] mod appstate; mod cachefile; mod cli; mod error; mod file; mod impl_ureq; pub mod output; mod sharry; pub use appstate::AppState; pub use cli::Cli; pub use error::{Error, Parameter, Result}; #[cfg(test)] pub fn check_trait(expected: &E, actual: &A, tr: &'static str, ty: &'static str) where E: std::fmt::Debug + PartialEq, A: std::fmt::Debug, { assert_eq!( expected, actual, "`impl {tr} for {ty}` expected: {expected:?}, actual: {actual:?}", ); } /// Helper to create a temp file from `data` #[cfg(test)] fn create_file(data: &[u8]) -> tempfile::NamedTempFile { use std::io::Write; let mut tmp = tempfile::NamedTempFile::new().expect("creating temp file"); tmp.write_all(data).expect("writing to tempfile"); tmp }