Skip to content

Commit

Permalink
run: cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelarie committed Oct 29, 2024
1 parent df83dca commit 998355f
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
10 changes: 5 additions & 5 deletions src/command/arguments.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
use std::sync::OnceLock;

pub struct CliArgs {
pub file_path: String,
pub file_path: String,
pub output_path: String,
pub no_comments: bool,
}

struct GatheredArgs {
file_path: Option<String>,
output_path: String,
no_comments: bool,
arguments: Vec<String>,
file_path: Option<String>,
output_path: String,
no_comments: bool,
arguments: Vec<String>,
#[allow(unused)]
remaining_args: Vec<String>,
}
Expand Down
4 changes: 2 additions & 2 deletions src/config/alias_ignore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use crate::command::arguments::DEBUG_MODE_GLOBAL;
/// * `alias_ignores` - A set of alias names to ignore.
/// * `command_ignores` - A list of command names to ignore.
pub struct AliasIgnoreResult {
pub alias_ignores: HashSet<String>,
pub command_ignores: Vec<String>,
pub alias_ignores: HashSet<String>,
pub command_ignores: Vec<String>,
}

/// Parses the `.aliasignore` file and returns the result.
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fn main() {

let alias_ignore_result =
alias_ignore::get_ignore_set().unwrap_or_else(|| AliasIgnoreResult {
alias_ignores: HashSet::new(),
alias_ignores: HashSet::new(),
command_ignores: Vec::new(),
});

Expand Down
6 changes: 3 additions & 3 deletions src/syntax_tree/alias.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ fn extract_alias(

#[derive(Debug, Clone)]
pub struct Alias {
pub name: String,
pub content: String,
pub name: String,
pub content: String,
pub is_valid_nushell: bool,
pub error_messages: Vec<String>,
pub error_messages: Vec<String>,
}

/// Find aliases in the given syntax tree.
Expand Down
2 changes: 1 addition & 1 deletion src/syntax_tree/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
pub mod alias;
pub mod nushell;
pub mod printer;
pub mod traverser;
pub mod process_file;
pub mod traverser;

#[allow(unused)]
pub use printer::print_tree;
Expand Down
4 changes: 2 additions & 2 deletions src/syntax_tree/nushell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fn create_nu_engine_state() -> EngineState {
}

pub struct AliasValidationResult {
pub is_valid: bool,
pub is_valid: bool,
pub error_messages: Vec<String>,
}

Expand Down Expand Up @@ -72,7 +72,7 @@ pub fn validate_alias_with_nu_parser(
}
} else {
AliasValidationResult {
is_valid: true,
is_valid: true,
error_messages: Vec::new(),
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/syntax_tree/printer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub fn print_tree(cursor: &mut TreeCursor, source: &[u8], depth: usize) {
indent = depth * 2
);

// Print the node's text if it's a leaf node (no children/last node)
// Print the node's text if it's a leaf node (no children/last node)
if node.child_count() == 0 {
let text = &source[node.byte_range()];
if let Ok(text) = std::str::from_utf8(text) {
Expand Down

0 comments on commit 998355f

Please sign in to comment.