diff --git a/src/docbuilder/mod.rs b/src/docbuilder/mod.rs index c5244fa18..a8b71a5ec 100644 --- a/src/docbuilder/mod.rs +++ b/src/docbuilder/mod.rs @@ -25,8 +25,8 @@ impl DocBuilder { pub fn new(config: Arc, db: Pool, build_queue: Arc) -> DocBuilder { DocBuilder { config, - build_queue, db, + build_queue, } } diff --git a/src/utils/github_updater.rs b/src/utils/github_updater.rs index a4eb7b70d..0eb9191f9 100644 --- a/src/utils/github_updater.rs +++ b/src/utils/github_updater.rs @@ -210,10 +210,8 @@ impl GithubUpdater { // When a node is missing (for example if the repository was deleted or made private) the // GraphQL API will return *both* a `null` instead of the data in the nodes list and a // `NOT_FOUND` error in the errors list. - for node in &response.data.nodes { - if let Some(node) = node { - self.store_repository(conn, &node)?; - } + for node in response.data.nodes.iter().flatten() { + self.store_repository(conn, &node)?; } for error in &response.errors { use GraphErrorPath::*; diff --git a/src/web/crate_details.rs b/src/web/crate_details.rs index 84ea2d767..573219a54 100644 --- a/src/web/crate_details.rs +++ b/src/web/crate_details.rs @@ -60,12 +60,10 @@ fn optional_markdown(markdown: &Option, serializer: S) -> Result) -> TeraResult { - debug_assert!(args.is_empty(), format!("{} takes no args", self.name)); + debug_assert!(args.is_empty(), "{} takes no args", self.name); Ok(self.value.clone()) } }