diff --git a/Cargo.lock b/Cargo.lock index 5923e37..47b4c7e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -253,9 +253,11 @@ name = "catena" version = "0.1.0" dependencies = [ "bibclean", + "bibfetch", "booksniff", "chunkmd", "citefind", + "colophon", "corpus-core", "cuekit", "cuepack", diff --git a/crates/bibfetch/src/ask.rs b/crates/bibfetch/src/ask.rs index 1eb9756..c08de32 100644 --- a/crates/bibfetch/src/ask.rs +++ b/crates/bibfetch/src/ask.rs @@ -22,7 +22,11 @@ pub struct Ask { impl Default for Ask { fn default() -> Self { - Self { polite: None, timeout: crate::TIMEOUT, attempts: crate::ATTEMPTS } + Self { + polite: None, + timeout: crate::TIMEOUT, + attempts: crate::ATTEMPTS, + } } } @@ -73,7 +77,9 @@ pub fn lookup( } match best { Some(record) => Ok(Some(record)), - None => Err(last_error.unwrap_or_else(|| Error::Unreachable("no register answered".into()))), + None => { + Err(last_error.unwrap_or_else(|| Error::Unreachable("no register answered".into()))) + } } } diff --git a/crates/bibfetch/src/main.rs b/crates/bibfetch/src/main.rs index 32906a1..7053914 100644 --- a/crates/bibfetch/src/main.rs +++ b/crates/bibfetch/src/main.rs @@ -114,12 +114,6 @@ fn main() -> ExitCode { }) } - - - - - - /// The identifier and its kind out of one record. fn read_identifier(line: &str) -> Result<(String, String), String> { let value: serde_json::Value = diff --git a/crates/colophon/src/shelf.rs b/crates/colophon/src/shelf.rs index 0a77fd0..8d40e9e 100644 --- a/crates/colophon/src/shelf.rs +++ b/crates/colophon/src/shelf.rs @@ -203,7 +203,10 @@ mod tests { fn real_cataloguing_headings_file() { let s = shelf(); for (raw, want) in [ - ("Political science – Early works to 1800", "Political Science"), + ( + "Political science – Early works to 1800", + "Political Science", + ), ("Political science — Philosophy", "Political Science"), ("Byzantine Empire—History—527-1081", "Byzantine History"), ("Christianity and culture", "Theology"), @@ -248,10 +251,7 @@ mod tests { #[test] fn a_heading_is_not_repeated() { - let filed = shelf().file(&[ - "Philosophy—Ancient".into(), - "Philosophy—Modern".into(), - ]); + let filed = shelf().file(&["Philosophy—Ancient".into(), "Philosophy—Modern".into()]); assert_eq!(filed.on, ["Philosophy"]); }