diff --git a/members/libpt-cli/src/args.rs b/members/libpt-cli/src/args.rs index ba8a57d..9e990f4 100644 --- a/members/libpt-cli/src/args.rs +++ b/members/libpt-cli/src/args.rs @@ -172,7 +172,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>; }