skoupidi пре 1 година
родитељ
комит
6c89d05770

+ 1 - 1
src/sdk/python/src/zkas.rs

@@ -346,7 +346,7 @@ impl MockProver {
             Ok(_) => true,
             Err(errs) => {
                 for err in errs {
-                    eprintln!("Error: Verify Failure: {:#?}", err);
+                    eprintln!("Error: Verify Failure: {err:#?}");
                 }
                 false
             }

+ 2 - 2
src/sdk/src/crypto/blind.rs

@@ -101,7 +101,7 @@ impl FromStr for BaseBlind {
 impl core::fmt::Display for BaseBlind {
     fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
         let disp: String = bs58::encode(self.0.to_repr()).into_string();
-        write!(f, "{}", disp)
+        write!(f, "{disp}")
     }
 }
 
@@ -135,6 +135,6 @@ impl FromStr for ScalarBlind {
 impl core::fmt::Display for ScalarBlind {
     fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
         let disp: String = bs58::encode(self.0.to_repr()).into_string();
-        write!(f, "{}", disp)
+        write!(f, "{disp}")
     }
 }

+ 2 - 2
src/sdk/src/crypto/keypair.rs

@@ -113,7 +113,7 @@ impl FromStr for SecretKey {
 impl core::fmt::Display for SecretKey {
     fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
         let disp: String = bs58::encode(self.0.to_repr()).into_string();
-        write!(f, "{}", disp)
+        write!(f, "{disp}")
     }
 }
 
@@ -207,6 +207,6 @@ impl FromStr for PublicKey {
 impl core::fmt::Display for PublicKey {
     fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
         let disp: String = bs58::encode(self.0.to_bytes()).into_string();
-        write!(f, "{}", disp)
+        write!(f, "{disp}")
     }
 }

+ 1 - 1
src/sdk/src/crypto/note.rs

@@ -81,7 +81,7 @@ impl AeadEncryptedNote {
                 let mut cursor = Cursor::new(&plaintext[..ct_len - AEAD_TAG_SIZE]);
                 Ok(D::decode(&mut cursor)?)
             }
-            Err(e) => Err(ContractError::IoError(format!("Note decrypt failed: {}", e))),
+            Err(e) => Err(ContractError::IoError(format!("Note decrypt failed: {e}"))),
         }
     }
 }

+ 2 - 2
src/sdk/src/error.rs

@@ -194,13 +194,13 @@ impl From<i64> for ContractError {
 
 impl From<std::io::Error> for ContractError {
     fn from(err: std::io::Error) -> Self {
-        Self::IoError(format!("{}", err))
+        Self::IoError(format!("{err}"))
     }
 }
 
 impl From<bs58::decode::Error> for ContractError {
     fn from(err: bs58::decode::Error) -> Self {
-        Self::IoError(format!("{}", err))
+        Self::IoError(format!("{err}"))
     }
 }
 

+ 1 - 1
src/sdk/src/hex.rs

@@ -23,7 +23,7 @@ use crate::{util::Itertools, ContractError, GenericResult};
 pub fn hex_from_iter<I: Iterator<Item = u8>>(iter: I) -> String {
     let mut repr = String::new();
     for b in iter {
-        repr += &format!("{:02x}", b);
+        repr += &format!("{b:02x}");
     }
     repr
 }

+ 1 - 1
src/sdk/src/log.rs

@@ -33,7 +33,7 @@ pub fn drk_log(message: &str) {
     }
 
     #[cfg(not(target_arch = "wasm32"))]
-    println!("{}", message);
+    println!("{message}");
 }
 
 #[cfg(target_arch = "wasm32")]