diff --git a/zebra-utils/src/bin/zebra-checkpoints/args.rs b/zebra-utils/src/bin/zebra-checkpoints/args.rs index e71b9710..f0e3a21c 100644 --- a/zebra-utils/src/bin/zebra-checkpoints/args.rs +++ b/zebra-utils/src/bin/zebra-checkpoints/args.rs @@ -1,5 +1,13 @@ +//! zebra-checkpoints arguments +//! +//! For usage please refer to the program help: `zebra-checkpoints --help` + +#![deny(missing_docs)] +#![allow(clippy::try_err)] + use structopt::StructOpt; +/// zebra-checkpoints arguments #[derive(Debug, StructOpt)] pub struct Args { /// Path to zcash-cli command diff --git a/zebra-utils/src/bin/zebra-checkpoints/main.rs b/zebra-utils/src/bin/zebra-checkpoints/main.rs index fa7ba457..56da8b46 100644 --- a/zebra-utils/src/bin/zebra-checkpoints/main.rs +++ b/zebra-utils/src/bin/zebra-checkpoints/main.rs @@ -8,7 +8,9 @@ //! zebra-consensus accepts an ordered list of checkpoints, starting with the //! genesis block. Checkpoint heights can be chosen arbitrarily. +#![deny(missing_docs)] #![allow(clippy::try_err)] + use color_eyre::eyre::Result; use serde_json::Value; use std::process::Stdio; @@ -30,7 +32,14 @@ const MAX_CHECKPOINT_BYTE_COUNT: u64 = 256 * 1024 * 1024; /// zcashd reorg limit. const BLOCK_REORG_LIMIT: BlockHeight = BlockHeight(100); -// Passthrough arguments if needed +/// Initialise tracing using its defaults. +fn init_tracing() { + tracing_subscriber::Registry::default() + .with(tracing_error::ErrorLayer::default()) + .init(); +} + +/// Add passthrough arguments to `cmd`, if present in `args`. fn passthrough(mut cmd: std::process::Command, args: &args::Args) -> std::process::Command { if !args.zcli_args.is_empty() { cmd.args(&args.zcli_args); @@ -119,9 +128,3 @@ fn main() -> Result<()> { Ok(()) } - -fn init_tracing() { - tracing_subscriber::Registry::default() - .with(tracing_error::ErrorLayer::default()) - .init(); -} diff --git a/zebra-utils/src/lib.rs b/zebra-utils/src/lib.rs index 31e1bb20..c126771c 100644 --- a/zebra-utils/src/lib.rs +++ b/zebra-utils/src/lib.rs @@ -1,3 +1,10 @@ +//! A Zebra utilities crate. + +// TODO: split this crate up into crates with meaningful names. + +#![deny(missing_docs)] +#![allow(clippy::try_err)] + #[cfg(test)] mod tests { #[test]