Skip to content

Commit 15659e4

Browse files
committed
fix: clippy warnings
1 parent 247b401 commit 15659e4

3 files changed

Lines changed: 11 additions & 10 deletions

File tree

‎src/constant/mod.rs‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,13 @@ pub struct TokenInfo<'a> {
3636
pub decimals: u8,
3737
name: &'a str,
3838
}
39-
#[allow(dead_code)]
39+
40+
impl Default for TokenAddress<'static> {
41+
fn default() -> Self {
42+
Self::new()
43+
}
44+
}
45+
4046
impl TokenAddress<'static> {
4147
pub fn new() -> Self {
4248
let tokens: Vec<TokenInfo> = vec![

‎src/swappr.rs‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,10 @@ impl AutoSwappr {
165165
success: true,
166166
tx_hash: x.transaction_hash,
167167
})),
168-
Err(x) => {
169-
println!("error message {}", x.to_string());
170-
Err(Json(ErrorResponse {
171-
success: false,
172-
message: "FAILED TO SWAP".to_string(),
173-
}))
174-
}
168+
Err(_) => Err(Json(ErrorResponse {
169+
success: false,
170+
message: "FAILED TO SWAP".to_string(),
171+
})),
175172
}
176173
}
177174

‎src/types/connector.rs‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,6 @@ pub struct ContractInfo {
159159
pub percentage_fee: u16,
160160
}
161161

162-
/// Token information for supported tokens
163-
164162
/// Pool configuration for different token pairs
165163
#[derive(Debug, Serialize, Deserialize, Clone)]
166164
pub struct PoolConfig {

0 commit comments

Comments
 (0)