aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorache <ache@ache.one>2026-08-16 23:41:01 +0200
committerache <ache@ache.one>2026-08-16 23:41:01 +0200
commit0c067f0c85cf54a001566b8542a809a916776b86 (patch)
tree83f805fdaeadb984e290e00bf12c07e57165124e
parentAdd a real README (diff)
Legend is spelled in french xD
-rw-r--r--src/args.rs6
-rw-r--r--src/main.rs6
-rw-r--r--src/print.rs6
3 files changed, 9 insertions, 9 deletions
diff --git a/src/args.rs b/src/args.rs
index 52d7ae8..d064370 100644
--- a/src/args.rs
+++ b/src/args.rs
@@ -28,9 +28,9 @@ pub struct Args {
#[arg(short = 's', long = "stats", action = ArgAction::SetTrue)]
pub stats: bool,
- /// Print the legende line
- #[arg(short = 'l', long = "legende", action = ArgAction::SetTrue)]
- pub legende: bool,
+ /// Print the legend line
+ #[arg(short = 'l', long = "legend", action = ArgAction::SetTrue)]
+ pub legend: bool,
/// Print the status line, the given target and the IP the ping is send to.
#[arg(short = 'S', long = "status", action = ArgAction::SetTrue)]
diff --git a/src/main.rs b/src/main.rs
index 2ca6fc7..0d39604 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -13,7 +13,7 @@ mod stats;
use args::Args;
use ip::parse_ip;
use pinger::{PingResult, spawn_ping};
-use print::{print_legende_line, print_ping_line, print_stats, print_status_line};
+use print::{print_legend_line, print_ping_line, print_stats, print_status_line};
use state::State;
use stats::compute_stats;
@@ -148,8 +148,8 @@ async fn main() {
let mut states: Vec<State> = Vec::new();
let mut packet_id: u32 = 0;
- if args.legende {
- print_legende_line();
+ if args.legend {
+ print_legend_line();
}
if args.status {
diff --git a/src/print.rs b/src/print.rs
index fb9ee67..d171d7c 100644
--- a/src/print.rs
+++ b/src/print.rs
@@ -146,7 +146,7 @@ const CHARS_TABLE: [SymbolTableElement; 25] = [
];
#[allow(clippy::unusual_byte_groupings)]
-const TO_HIDE_LEGENDE_ELEMENTS: [u32; 26] = [
+const TO_HIDE_LEGEND_ELEMENTS: [u32; 26] = [
0b000_000_000_000_0_000_000_000_000,
0b000_000_000_000_1_000_000_000_000,
0b000_000_001_000_0_000_100_000_000,
@@ -185,7 +185,7 @@ pub fn print_status_line(target_str: &String, ip: &IpAddr) {
println!("PING {} ({})", target_str, ip);
}
-pub fn print_legende_line() {
+pub fn print_legend_line() {
let nb_cols: u32 = if let Some((w, _)) = term_size::dimensions() {
w as u32
} else {
@@ -200,7 +200,7 @@ pub fn print_legende_line() {
let nb_elements_to_skip = index;
for (index, element) in CHARS_TABLE.iter().enumerate() {
- if (TO_HIDE_LEGENDE_ELEMENTS[nb_elements_to_skip]) & (1 << index) != 0 {
+ if (TO_HIDE_LEGEND_ELEMENTS[nb_elements_to_skip]) & (1 << index) != 0 {
continue;
}
print!(