Skip to content

Commit 8d9f10f

Browse files
committed
Fix clippy warnings
1 parent 981056c commit 8d9f10f

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

bin/commands/inbox.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ pub async fn run(options: Options, ctx: impl terminal::Context) -> anyhow::Resul
202202
if let Err(err) = crate::log::enable() {
203203
println!("{err}");
204204
}
205-
log::info!("Starting inbox listing interface in project {}..", rid);
205+
log::info!("Starting inbox listing interface in project {rid}..");
206206

207207
let context = list::Context {
208208
profile,
@@ -218,7 +218,7 @@ pub async fn run(options: Options, ctx: impl terminal::Context) -> anyhow::Resul
218218
.map(|o| serde_json::to_string(&o).unwrap_or_default())
219219
.unwrap_or_default();
220220

221-
log::info!("About to print to `stderr`: {}", selection);
221+
log::info!("About to print to `stderr`: {selection}");
222222
log::info!("Exiting inbox listing interface..");
223223

224224
eprint!("{selection}");

bin/commands/issue.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ pub async fn run(options: Options, ctx: impl terminal::Context) -> anyhow::Resul
205205
if let Err(err) = crate::log::enable() {
206206
println!("{err}");
207207
}
208-
log::info!("Starting issue listing interface in project {}..", rid);
208+
log::info!("Starting issue listing interface in project {rid}..");
209209

210210
let context = list::Context {
211211
profile,
@@ -221,7 +221,7 @@ pub async fn run(options: Options, ctx: impl terminal::Context) -> anyhow::Resul
221221
.map(|o| serde_json::to_string(&o).unwrap_or_default())
222222
.unwrap_or_default();
223223

224-
log::info!("About to print to `stderr`: {}", selection);
224+
log::info!("About to print to `stderr`: {selection}");
225225
log::info!("Exiting issue listing interface..");
226226

227227
eprint!("{selection}");

bin/commands/patch.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ pub async fn run(options: Options, ctx: impl terminal::Context) -> anyhow::Resul
279279
.map(|o| serde_json::to_string(&o).unwrap_or_default())
280280
.unwrap_or_default();
281281

282-
log::info!("About to print to `stderr`: {}", selection);
282+
log::info!("About to print to `stderr`: {selection}");
283283
log::info!("Exiting patch list interface..");
284284

285285
eprint!("{selection}");
@@ -364,7 +364,7 @@ mod interface {
364364
) -> anyhow::Result<Option<Selection<ObjectId>>> {
365365
let repository = profile.storage.repository(rid).unwrap();
366366

367-
log::info!("Starting patch selection interface in project {}..", rid);
367+
log::info!("Starting patch selection interface in project {rid}..");
368368

369369
let context = list::Context {
370370
profile,
@@ -449,7 +449,7 @@ mod interface {
449449
.run()
450450
.await?;
451451

452-
log::debug!("Received response from TUI: {:?}", response);
452+
log::debug!("Received response from TUI: {response:?}");
453453

454454
if let Some(response) = response.as_ref() {
455455
if let Some(ReviewAction::Comment) = response.action {

bin/commands/patch/list/imui.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ impl store::Update<Message> for App {
143143
type Return = Selection;
144144

145145
fn update(&mut self, message: Message) -> Option<tui::Exit<Selection>> {
146-
log::debug!("[State] Received message: {:?}", message);
146+
log::debug!("[State] Received message: {message:?}");
147147

148148
match message {
149149
Message::Quit => Some(Exit { value: None }),

bin/commands/patch/review.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ impl store::Update<Message> for App<'_> {
562562
type Return = Response;
563563

564564
fn update(&mut self, message: Message) -> Option<Exit<Self::Return>> {
565-
log::info!("Received message: {:?}", message);
565+
log::info!("Received message: {message:?}");
566566

567567
match message {
568568
Message::ShowMain => {
@@ -609,14 +609,14 @@ impl store::Update<Message> for App<'_> {
609609
Message::Accept => {
610610
match self.accept_selected_hunk() {
611611
Ok(()) => log::info!("Accepted selected hunk."),
612-
Err(err) => log::info!("An error occured while accepting hunk: {}", err),
612+
Err(err) => log::info!("An error occured while accepting hunk: {err}"),
613613
}
614614
None
615615
}
616616
Message::Reject => {
617617
match self.reject_selected_hunk() {
618618
Ok(()) => log::info!("Rejected selected hunk."),
619-
Err(err) => log::info!("An error occured while rejecting hunk: {}", err),
619+
Err(err) => log::info!("An error occured while rejecting hunk: {err}"),
620620
}
621621
None
622622
}

src/ui/im.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ impl Frontend {
6868
_ = ticker.tick() => (),
6969
// Handle input events
7070
Some(event) = events_rx.recv() => {
71-
log::info!("Received event: {:?}", event);
71+
log::info!("Received event: {event:?}");
7272
match event {
7373
Event::Key(key) => ctx.store_input(key),
7474
Event::Resize => (),
@@ -80,7 +80,7 @@ impl Frontend {
8080
},
8181
// Catch and handle interrupt signal to gracefully shutdown
8282
Ok(interrupted) = interrupt_rx.recv() => {
83-
log::info!("Received interrupt: {:?}", interrupted);
83+
log::info!("Received interrupt: {interrupted:?}");
8484
terminal.restore()?;
8585

8686
break Ok(interrupted);
@@ -90,7 +90,7 @@ impl Frontend {
9090
let ctx = ctx.clone().with_frame_size(frame.area());
9191

9292
if let Err(err) = state.show(&ctx, frame) {
93-
log::warn!("Drawing failed: {}", err);
93+
log::warn!("Drawing failed: {err}");
9494
}
9595
})?;
9696

0 commit comments

Comments
 (0)