Skip to content

Commit c0df81b

Browse files
committed
Pacify nightly clippy
TODO: replave eprintln with error! tracing calls
1 parent 464e9c4 commit c0df81b

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

tuktuk-cli/src/cmd/task.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,10 +403,10 @@ impl TaskCmd {
403403
)
404404
.await?;
405405

406-
println!("Tx sent: {}", txid);
406+
println!("Tx sent: {txid}");
407407
}
408408
Err(e) => {
409-
println!("Error running task: {}", e);
409+
println!("Error running task: {e:?}");
410410
}
411411
}
412412
}

tuktuk-crank-turner/src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,25 +56,25 @@ async fn metrics_handler() -> Result<impl Reply, Rejection> {
5656

5757
let mut buffer = Vec::new();
5858
if let Err(e) = encoder.encode(&REGISTRY.gather(), &mut buffer) {
59-
eprintln!("could not encode custom metrics: {}", e);
59+
eprintln!("could not encode custom metrics: {e:?}");
6060
};
6161
let mut res = match String::from_utf8(buffer.clone()) {
6262
Ok(v) => v,
6363
Err(e) => {
64-
eprintln!("custom metrics could not be from_utf8'd: {}", e);
64+
eprintln!("custom metrics could not be from_utf8'd: {e:?}");
6565
String::default()
6666
}
6767
};
6868
buffer.clear();
6969

7070
let mut buffer = Vec::new();
7171
if let Err(e) = encoder.encode(&prometheus::gather(), &mut buffer) {
72-
eprintln!("could not encode prometheus metrics: {}", e);
72+
eprintln!("could not encode prometheus metrics: {e:?}");
7373
};
7474
let res_custom = match String::from_utf8(buffer.clone()) {
7575
Ok(v) => v,
7676
Err(e) => {
77-
eprintln!("prometheus metrics could not be from_utf8'd: {}", e);
77+
eprintln!("prometheus metrics could not be from_utf8'd: {e:?}");
7878
String::default()
7979
}
8080
};

tuktuk-crank-turner/src/task_processor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ impl TimedTask {
125125
self.handle_completion(
126126
ctx,
127127
Some(TransactionQueueError::RawSimulatedTransactionError(
128-
format!("Failed to get instructions: {:?}", err),
128+
format!("Failed to get instructions: {err:?}"),
129129
)),
130130
0,
131131
)

tuktuk-sdk/src/watcher.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ impl PubsubTracker {
136136
loop {
137137
interval.tick().await;
138138
if let Err(e) = self.check_for_changes().await {
139-
eprintln!("Error checking for changes: {:?}", e);
139+
eprintln!("Error checking for changes: {e:?}");
140140
}
141141
}
142142
}
@@ -167,7 +167,7 @@ impl PubsubTracker {
167167

168168
fn publish_change(&self, pubkey: Pubkey, account_data: Account) {
169169
if self.publisher.send((pubkey, account_data.clone())).is_err() {
170-
eprintln!("Failed to send update for pubkey: {:?}", pubkey);
170+
eprintln!("Failed to send update for pubkey: {pubkey}");
171171
}
172172
}
173173
}

0 commit comments

Comments
 (0)