Skip to content

Commit

Permalink
changed required due lint alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
brunocampos-ssa committed Jun 4, 2024
1 parent f5766ab commit 7c29ae5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
12 changes: 6 additions & 6 deletions packages/kos-sdk/src/chains/klever/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ pub struct DataAccount {
pub account: Account,
}

impl ToString for ResultAccount {
fn to_string(&self) -> String {
serde_json::to_string(&self).unwrap()
impl std::fmt::Display for ResultAccount {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "({})", serde_json::to_string(&self).unwrap())
}
}

Expand Down Expand Up @@ -135,8 +135,8 @@ pub struct TransferTXRequest {
pub kda_royalties: Option<i64>,
}

impl ToString for TransferTXRequest {
fn to_string(&self) -> String {
serde_json::to_string(&self).unwrap()
impl std::fmt::Display for TransferTXRequest {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "({})", serde_json::to_string(&self).unwrap())
}
}
3 changes: 2 additions & 1 deletion packages/kos-sdk/src/chains/tron/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ impl TRX {
#[cfg(test)]
mod tests {
use std::assert_eq;
use std::str;

use hex::FromHex;

Expand Down Expand Up @@ -455,7 +456,7 @@ mod tests {
DEFAULT_ADDRESS.to_string(),
BigNumber::from(10),
None,
None,
Some("https://tron.node.klever.io".to_string()),
));

assert!(result.is_ok());
Expand Down

0 comments on commit 7c29ae5

Please sign in to comment.