Skip to content
Merged
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
584 changes: 312 additions & 272 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version = "0.23.6"
authors = ["FroVolod <frol_off@meta.ua>", "Near Inc <hello@nearprotocol.com>"]
license = "MIT OR Apache-2.0"
edition = "2024"
rust-version = "1.88"
homepage = "https://near.cli.rs"
repository = "https://github.com/near/near-cli-rs"
description = "human-friendly console utility that helps to interact with NEAR Protocol from command line."
Expand Down
2 changes: 1 addition & 1 deletion src/commands/account/delete_key/public_keys_to_delete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ impl std::fmt::Display for AccessKeyInfo {
method_names,
} => {
let allowance_message = match allowance {
Some(amount) => format!("with a remaining fee allowance of {}", amount),
Some(amount) => format!("with a remaining fee allowance of {amount}"),
None => "with no limit".to_string(),
};
if method_names.is_empty() {
Expand Down
6 changes: 3 additions & 3 deletions src/commands/contract/download_wasm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ impl std::fmt::Display for ContractType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
ContractType::Regular(account_id) => {
write!(f, "regular:{}", account_id)
write!(f, "regular:{account_id}")
}
ContractType::GlobalContractByAccountId { account_id, .. } => {
write!(f, "global-contract-by-account-id:{}", account_id)
write!(f, "global-contract-by-account-id:{account_id}")
}
ContractType::GlobalContractByCodeHash(code_hash) => {
write!(f, "global-contract-by-hash:{}", code_hash)
write!(f, "global-contract-by-hash:{code_hash}")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/commands/tokens/view_nft_assets/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl ViewNftAssetsContext {
let serde_call_result: serde_json::Value = call_result.parse_result_from_json()?;

if let crate::Verbosity::Interactive | crate::Verbosity::TeachMe = previous_context.global_context.verbosity {
eprintln!("\n{} account has NFT tokens (printed to stdout):", owner_account_id);
eprintln!("\n{owner_account_id} account has NFT tokens (printed to stdout):");
}
println!("{}", serde_json::to_string_pretty(&serde_call_result)?);

Expand Down
4 changes: 2 additions & 2 deletions src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1521,7 +1521,7 @@ pub fn print_transaction_status(
let mut total_gas_burnt = transaction_info.transaction_outcome.outcome.gas_burnt;
let mut total_tokens_burnt = transaction_info.transaction_outcome.outcome.tokens_burnt;

transaction_execution_info.push_str(&format!("\nGas burned: {}", total_gas_burnt));
transaction_execution_info.push_str(&format!("\nGas burned: {total_gas_burnt}"));

transaction_execution_info.push_str(&format!(
"\nTransaction fee: {}{}",
Expand Down Expand Up @@ -1582,7 +1582,7 @@ pub fn print_transaction_status(
tracing::info!(
parent: &tracing::Span::none(),
"Function execution logs:{}",
crate::common::indent_payload(&format!("{}\n ",logs_info))
crate::common::indent_payload(&format!("{logs_info}\n "))
);
if returned_value_bytes.is_empty() {
tracing::info!(
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ pub fn setup_tracing_with_extra_directives(
Level::ERROR => ("ERROR ", "\x1b[31m"), // Red
};

write!(writer, "{}├ {}", color_code, icon)?;
write!(writer, "{color_code}├ {icon}")?;

write!(writer, "\x1b[0m")?;

Expand Down
2 changes: 1 addition & 1 deletion tests/tokens.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ async fn test_view_near_balance() -> Result<(), Box<dyn std::error::Error>> {
let (_sandbox, _temp_dir) = prepare_tests().await?;

let output = Command::new("target/debug/near")
.args(&[
.args([
"tokens",
"test.near",
"view-near-balance",
Expand Down
Loading