diff --git a/src/account.rs b/src/account.rs index 550dfe2..373cf8a 100644 --- a/src/account.rs +++ b/src/account.rs @@ -531,7 +531,7 @@ pub(crate) async fn transfer_cli( // Check if `to` is an account, we know that checksum is valid at // this point. Otherwise, `To` won't even parse from user input. // At this point we want to query the provider to see if the - // acount is actually something we can transfer to. + // account is actually something we can transfer to. let addr = checksum_encode(&format!("0x{hex_addr}"))?; let to_addr = fuels::types::Bytes32::from_str(&addr).map_err(|e| anyhow!("{e}"))?; if !provider.is_user_account(to_addr).await? { diff --git a/src/balance.rs b/src/balance.rs index 15d4497..39e652e 100644 --- a/src/balance.rs +++ b/src/balance.rs @@ -115,8 +115,7 @@ pub fn print_account_balances( if balance.is_empty() { continue; } - - list.add_seperator(); + list.add_separator(); list.add( format!("Account {ix}"), checksum_encode(&format!("0x{}", accounts_map[ix]))?, @@ -127,7 +126,7 @@ pub fn print_account_balances( list.add("Asset ID", asset_id); list.add("Amount", amount.to_string()); } - list.add_seperator(); + list.add_separator(); } println!("{}", list); Ok(()) diff --git a/src/format.rs b/src/format.rs index 0b1f0ff..ea23b81 100644 --- a/src/format.rs +++ b/src/format.rs @@ -4,12 +4,12 @@ use anyhow::Result; #[derive(PartialEq, Eq)] enum Value { - Seperator, + Separator, NewLine, Entry(String, String), } -/// Simple helper to print key-value entries where the keys are all alligned. +/// Simple helper to print key-value entries where the keys are all aligned. /// /// Here is an example of how it looks: /// @@ -37,18 +37,18 @@ impl List { self.0.push(Value::NewLine); } - pub fn add_seperator(&mut self) { - if self.0.last() == Some(&Value::Seperator) { + pub fn add_separator(&mut self) { + if self.0.last() == Some(&Value::Separator) { return; } - self.0.push(Value::Seperator); + self.0.push(Value::Separator); } pub fn longest_title(&self) -> usize { self.0 .iter() .map(|value| match value { - Value::Seperator => 0, + Value::Separator => 0, Value::NewLine => 0, Value::Entry(title, _) => title.len(), }) @@ -64,7 +64,7 @@ impl Display for List { .0 .iter() .map(|entry| match entry { - Value::Seperator => None, + Value::Separator => None, Value::NewLine => Some("".to_owned()), Value::Entry(title, value) => { let padding = " ".repeat(longest_key - title.len()); @@ -79,11 +79,11 @@ impl Display for List { .max() .unwrap_or(0); - let seperator = "-".repeat(longest_entry); + let separator = "-".repeat(longest_entry); let formatted = entries .into_iter() - .map(|entry| entry.map(|s| s.to_string()).unwrap_or(seperator.clone())) + .map(|entry| entry.map(|s| s.to_string()).unwrap_or(separator.clone())) .collect::>() .join("\n");