clippy warnings fix

This commit is contained in:
lemonsh 2023-05-28 18:14:58 +02:00
parent a3c8ef9f74
commit ea6b2a3850
2 changed files with 5 additions and 6 deletions

View File

@ -119,10 +119,10 @@ pub(crate) async fn run(cmd: PortForwardsCommand, state: &AppState) -> Result<()
} }
}) })
.await?; .await?;
if !modified { if modified {
cprintln!("<red!>No port with id {id} exists"); cprintln!("<green!>Done!");
} else { } else {
cprintln!("<green!>Done!") cprintln!("<red!>No port with id {id} exists");
} }
} }
} }

View File

@ -2,13 +2,12 @@ use crate::{cli::ShellCommand, utils::QuotableArgs};
use clap::{FromArgMatches, Parser}; use clap::{FromArgMatches, Parser};
use cli::Args; use cli::Args;
use color_eyre::Result; use color_eyre::Result;
use color_print::{cformat, cprintln, cstr}; use color_print::{cformat, cprintln};
use connectbox::ConnectBox; use connectbox::ConnectBox;
use rustyline::{ use rustyline::{
error::ReadlineError, error::ReadlineError,
highlight::Highlighter, highlight::Highlighter,
history::{DefaultHistory, FileHistory, MemHistory}, Completer, Editor, Helper, Hinter, Validator,
Completer, DefaultEditor, Editor, Helper, Hinter, Validator,
}; };
use std::borrow::Cow; use std::borrow::Cow;