mirror of
https://git.pumpin.online/funkpower/catena.git
synced 2026-10-23 03:07:13 +00:00
fmt
check.sh runs cargo fmt --check and three of my commits did not.
This commit is contained in:
Generated
+2
@@ -253,9 +253,11 @@ name = "catena"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bibclean",
|
"bibclean",
|
||||||
|
"bibfetch",
|
||||||
"booksniff",
|
"booksniff",
|
||||||
"chunkmd",
|
"chunkmd",
|
||||||
"citefind",
|
"citefind",
|
||||||
|
"colophon",
|
||||||
"corpus-core",
|
"corpus-core",
|
||||||
"cuekit",
|
"cuekit",
|
||||||
"cuepack",
|
"cuepack",
|
||||||
|
|||||||
@@ -22,7 +22,11 @@ pub struct Ask {
|
|||||||
|
|
||||||
impl Default for Ask {
|
impl Default for Ask {
|
||||||
fn default() -> Self {
|
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 {
|
match best {
|
||||||
Some(record) => Ok(Some(record)),
|
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())))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -114,12 +114,6 @@ fn main() -> ExitCode {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// The identifier and its kind out of one record.
|
/// The identifier and its kind out of one record.
|
||||||
fn read_identifier(line: &str) -> Result<(String, String), String> {
|
fn read_identifier(line: &str) -> Result<(String, String), String> {
|
||||||
let value: serde_json::Value =
|
let value: serde_json::Value =
|
||||||
|
|||||||
@@ -203,7 +203,10 @@ mod tests {
|
|||||||
fn real_cataloguing_headings_file() {
|
fn real_cataloguing_headings_file() {
|
||||||
let s = shelf();
|
let s = shelf();
|
||||||
for (raw, want) in [
|
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"),
|
("Political science — Philosophy", "Political Science"),
|
||||||
("Byzantine Empire—History—527-1081", "Byzantine History"),
|
("Byzantine Empire—History—527-1081", "Byzantine History"),
|
||||||
("Christianity and culture", "Theology"),
|
("Christianity and culture", "Theology"),
|
||||||
@@ -248,10 +251,7 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn a_heading_is_not_repeated() {
|
fn a_heading_is_not_repeated() {
|
||||||
let filed = shelf().file(&[
|
let filed = shelf().file(&["Philosophy—Ancient".into(), "Philosophy—Modern".into()]);
|
||||||
"Philosophy—Ancient".into(),
|
|
||||||
"Philosophy—Modern".into(),
|
|
||||||
]);
|
|
||||||
assert_eq!(filed.on, ["Philosophy"]);
|
assert_eq!(filed.on, ["Philosophy"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user