Radish alpha
r
rad:z39mP9rQAaGmERfUMPULfPUi473tY
Radicle terminal user interface
Radicle
Git
Fix clippy warnings
Erik Kundt committed 8 months ago
commit 8d9f10f6d818049caa2b922ba56f7414071d9963
parent 981056c
6 files changed +14 -14
modified bin/commands/inbox.rs
@@ -202,7 +202,7 @@ pub async fn run(options: Options, ctx: impl terminal::Context) -> anyhow::Resul
            if let Err(err) = crate::log::enable() {
                println!("{err}");
            }
-
            log::info!("Starting inbox listing interface in project {}..", rid);
+
            log::info!("Starting inbox listing interface in project {rid}..");

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

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

                eprint!("{selection}");
modified bin/commands/issue.rs
@@ -205,7 +205,7 @@ pub async fn run(options: Options, ctx: impl terminal::Context) -> anyhow::Resul
            if let Err(err) = crate::log::enable() {
                println!("{err}");
            }
-
            log::info!("Starting issue listing interface in project {}..", rid);
+
            log::info!("Starting issue listing interface in project {rid}..");

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

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

                eprint!("{selection}");
modified bin/commands/patch.rs
@@ -279,7 +279,7 @@ pub async fn run(options: Options, ctx: impl terminal::Context) -> anyhow::Resul
                    .map(|o| serde_json::to_string(&o).unwrap_or_default())
                    .unwrap_or_default();

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

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

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

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

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

            if let Some(response) = response.as_ref() {
                if let Some(ReviewAction::Comment) = response.action {
modified bin/commands/patch/list/imui.rs
@@ -143,7 +143,7 @@ impl store::Update<Message> for App {
    type Return = Selection;

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

        match message {
            Message::Quit => Some(Exit { value: None }),
modified bin/commands/patch/review.rs
@@ -562,7 +562,7 @@ impl store::Update<Message> for App<'_> {
    type Return = Response;

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

        match message {
            Message::ShowMain => {
@@ -609,14 +609,14 @@ impl store::Update<Message> for App<'_> {
            Message::Accept => {
                match self.accept_selected_hunk() {
                    Ok(()) => log::info!("Accepted selected hunk."),
-
                    Err(err) => log::info!("An error occured while accepting hunk: {}", err),
+
                    Err(err) => log::info!("An error occured while accepting hunk: {err}"),
                }
                None
            }
            Message::Reject => {
                match self.reject_selected_hunk() {
                    Ok(()) => log::info!("Rejected selected hunk."),
-
                    Err(err) => log::info!("An error occured while rejecting hunk: {}", err),
+
                    Err(err) => log::info!("An error occured while rejecting hunk: {err}"),
                }
                None
            }
modified src/ui/im.rs
@@ -68,7 +68,7 @@ impl Frontend {
                _ = ticker.tick() => (),
                // Handle input events
                Some(event) = events_rx.recv() => {
-
                    log::info!("Received event: {:?}", event);
+
                    log::info!("Received event: {event:?}");
                    match event {
                        Event::Key(key) => ctx.store_input(key),
                        Event::Resize => (),
@@ -80,7 +80,7 @@ impl Frontend {
                },
                // Catch and handle interrupt signal to gracefully shutdown
                Ok(interrupted) = interrupt_rx.recv() => {
-
                    log::info!("Received interrupt: {:?}", interrupted);
+
                    log::info!("Received interrupt: {interrupted:?}");
                    terminal.restore()?;

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

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