Skip to content

Commit

Permalink
chore: resolve warnings (#1473)
Browse files Browse the repository at this point in the history
  • Loading branch information
Barsik-sus authored Nov 6, 2024
1 parent e429927 commit 4f99916
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
14 changes: 13 additions & 1 deletion module/move/wca/src/ca/formatter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,26 @@ mod private
use iter_tools::Itertools;
use ca::aggregator::Order;

/// -
/// Enum representing the format options for generating help content.
///
/// `HelpFormat` defines the output format of help content, enabling the choice
/// between different styles, such as `Markdown` for structured text, or other
/// custom formats.
#[ derive( Debug, Clone, PartialEq ) ]
pub enum HelpFormat
{
/// Generates help content in Markdown format, suitable for environments
/// that support Markdown rendering (e.g., documentation platforms, text editors).
Markdown,
/// Represents an alternative format, customizable for different needs.
Another,
}

/// Generates Markdown-formatted help content based on a dictionary of terms and a specified order.
///
/// The `md_generator` function takes a reference to a `Dictionary` and an `Order` to produce
/// a help document in Markdown format. This function is useful for generating structured,
/// readable help documentation suitable for Markdown-compatible platforms.
pub fn md_generator( grammar : &Dictionary, order: Order ) -> String
{
let text = grammar.commands()
Expand Down
9 changes: 9 additions & 0 deletions module/move/wca/src/ca/help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,16 @@ mod private

// qqq : for Bohdan : it should transparent mechanist which patch list of commands, not a stand-alone mechanism

/// Enum `LevelOfDetail` specifies the granularity of detail for rendering or processing:
#[ derive( Debug, Default, Copy, Clone, PartialEq, Eq ) ]
pub enum LevelOfDetail
{
/// No detail (default).
#[ default ]
None,
/// Basic level of detail.
Simple,
/// High level of detail.
Detailed,
}

Expand Down Expand Up @@ -64,6 +68,11 @@ mod private
}

// qqq : for Barsik : make possible to change properties order
/// Generates help content as a formatted string based on a given dictionary and options.
///
/// This function takes a `Dictionary` of terms or commands and a `HelpGeneratorOptions`
/// struct to customize the help output, generating a user-friendly help message
/// or guide in `String` format.
pub fn generate_help_content( dictionary : &Dictionary, o : HelpGeneratorOptions< '_ > ) -> String
{
struct Row
Expand Down
3 changes: 0 additions & 3 deletions module/move/wca/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
#![ doc = include_str!( concat!( env!( "CARGO_MANIFEST_DIR" ), "/", "Readme.md" ) ) ]
#![ doc = include_str!( concat!( env!( "CARGO_MANIFEST_DIR" ), "/", "doc/", "wca.md" ) ) ]

#![ allow( where_clauses_object_safety ) ] // https://github.com/chris-morgan/anymap/issues/31
// qqq : xxx : is it neccessary?

use mod_interface::mod_interface;

pub mod ca;
Expand Down

0 comments on commit 4f99916

Please sign in to comment.