Skip to content

chore: Fix typos #243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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? {
Expand Down
5 changes: 2 additions & 3 deletions src/balance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]))?,
Expand All @@ -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(())
Expand Down
18 changes: 9 additions & 9 deletions src/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
///
Expand Down Expand Up @@ -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(),
})
Expand All @@ -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());
Expand All @@ -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::<Vec<_>>()
.join("\n");

Expand Down
Loading