diff --git a/omnibor/src/bin/omnibor/find.rs b/omnibor/src/bin/omnibor/find.rs index d1045d2..62bd6a6 100644 --- a/omnibor/src/bin/omnibor/find.rs +++ b/omnibor/src/bin/omnibor/find.rs @@ -16,6 +16,7 @@ use tokio::sync::mpsc::Sender; pub async fn run(tx: &Sender, args: &FindArgs) -> Result<()> { let FindArgs { url, path, format } = args; + // TODO(alilleybrinker): Correctly handle possible future hash formats. let id = ArtifactId::::id_url(url.clone())?; let url = id.url(); @@ -24,7 +25,7 @@ pub async fn run(tx: &Sender, args: &FindArgs) -> Result<()> { loop { match entries.next().await { None => break, - Some(Err(e)) => tx.send(PrinterCmd::Message(Msg::error(e, *format))).await?, + Some(Err(e)) => tx.send(PrinterCmd::error(e, *format)).await?, Some(Ok(entry)) => { let path = &entry.path(); diff --git a/omnibor/src/bin/omnibor/main.rs b/omnibor/src/bin/omnibor/main.rs index 9281f1d..af43925 100644 --- a/omnibor/src/bin/omnibor/main.rs +++ b/omnibor/src/bin/omnibor/main.rs @@ -31,7 +31,7 @@ async fn main() -> ExitCode { exit_code } -/// Select and run the chosen chosen. +/// Select and run the chosen command. async fn run(tx: &Sender, cmd: &Command) -> Result<()> { match cmd { Command::Id(ref args) => id::run(tx, args).await, diff --git a/omnibor/src/bin/omnibor/print.rs b/omnibor/src/bin/omnibor/print.rs index 9590346..69da243 100644 --- a/omnibor/src/bin/omnibor/print.rs +++ b/omnibor/src/bin/omnibor/print.rs @@ -87,7 +87,10 @@ impl Printer { /// A print queue message, either an actual message or a signals to end printing. #[derive(Debug, Clone)] pub enum PrinterCmd { + /// Shut down the printer task. End, + + /// Print the following message. Message(Msg), }