From c9c835188b1b0d0392afb7aaab8b21ab4257d5b8 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Tue, 9 Jul 2024 15:39:06 +0000 Subject: [PATCH] automatic cargo CI changes --- members/libpt-cli/src/args.rs | 2 +- members/libpt-cli/src/printing.rs | 6 +++--- members/libpt-cli/src/repl/default.rs | 8 ++++---- members/libpt-cli/src/repl/mod.rs | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/members/libpt-cli/src/args.rs b/members/libpt-cli/src/args.rs index 31ae1b7..20131cb 100644 --- a/members/libpt-cli/src/args.rs +++ b/members/libpt-cli/src/args.rs @@ -173,7 +173,7 @@ impl VerbosityLevel { } } - /// get the [log::Level] for that VerbosityLevel + /// get the [`log::Level`] for that `VerbosityLevel` /// /// This is the method for the [log] crate, which I use less often. /// diff --git a/members/libpt-cli/src/printing.rs b/members/libpt-cli/src/printing.rs index e9d0c35..dff8192 100644 --- a/members/libpt-cli/src/printing.rs +++ b/members/libpt-cli/src/printing.rs @@ -5,7 +5,7 @@ //! output for CLI applications. //! //! Note that most of the utilities in this module are focused on communication with humans, not -//! with machines. Consider evaluating [std::io::IsTerminal] before using colorful, dynamic and bordered +//! with machines. Consider evaluating [`std::io::IsTerminal`] before using colorful, dynamic and bordered //! printing. If you are talking to a machine, it might be useful to not add extra space, add a //! newline per output or even output JSON. An example that does this well is `ls`: //! @@ -50,12 +50,12 @@ use console::{style, Color}; /// ``` #[inline] pub fn blockprint(content: impl ToString, color: Color) { - println!("{}", blockfmt(content, color)) + println!("{}", blockfmt(content, color)); } /// Formats content with a simple border around it /// -/// This function is a convenience wrapper around [blockfmt_advanced] with preset values for +/// This function is a convenience wrapper around [`blockfmt_advanced`] with preset values for /// border style, content arrangement, and cell alignment. It automatically formats the content /// with a border as large as possible and centers the content. The resulting cell is colored in /// the specified color. diff --git a/members/libpt-cli/src/repl/default.rs b/members/libpt-cli/src/repl/default.rs index 7e540a7..28b249f 100644 --- a/members/libpt-cli/src/repl/default.rs +++ b/members/libpt-cli/src/repl/default.rs @@ -9,10 +9,10 @@ use super::Repl; use embed_doc_image::embed_doc_image; /// [clap] help template with only usage and commands/options -pub const REPL_HELP_TEMPLATE: &str = r#"{usage-heading} {usage} +pub const REPL_HELP_TEMPLATE: &str = r"{usage-heading} {usage} {all-args}{tab} -"#; +"; use clap::{Parser, Subcommand}; use dialoguer::{BasicHistory, Completion}; @@ -186,11 +186,11 @@ where buf.push( format!("{c:?}") .split_whitespace() - .map(|e| e.to_lowercase()) + .map(str::to_lowercase) .next() .unwrap() .to_string(), - ) + ); } trace!("commands: {buf:?}"); buf diff --git a/members/libpt-cli/src/repl/mod.rs b/members/libpt-cli/src/repl/mod.rs index 5c0d343..cea67dc 100644 --- a/members/libpt-cli/src/repl/mod.rs +++ b/members/libpt-cli/src/repl/mod.rs @@ -22,7 +22,7 @@ use clap::{Parser, Subcommand}; /// Common Trait for repl objects /// -/// Unless you want to implement custom features (not just commands), just use [DefaultRepl]. +/// Unless you want to implement custom features (not just commands), just use [`DefaultRepl`]. pub trait Repl: Parser + Debug where C: Debug, @@ -39,6 +39,6 @@ where /// /// This should be used at the start of your loop. /// - /// Note that the help menu is an Error: [clap::error::ErrorKind::DisplayHelp] + /// Note that the help menu is an Error: [`clap::error::ErrorKind::DisplayHelp`] fn step(&mut self) -> Result<(), ReplError>; }