fixed clippy warnings

This commit is contained in:
Thomas Eppers 2022-07-23 00:47:25 +02:00
parent d1ef5c6755
commit 88070489f3
3 changed files with 4 additions and 4 deletions

View File

@ -54,7 +54,7 @@ impl std::iter::Iterator for State {
impl Ui {
pub fn run(opt: &Opt) {
let repo_id = opt.repo.as_ref().map(|repo| String::as_str(repo));
let repo_id = opt.repo.as_deref();
let mut ui = Ui {
state: State::SelectService,

View File

@ -49,7 +49,7 @@ pub struct NoYaml {
impl NoYaml {
pub fn run(opt: &Opt) {
let repo_id = opt.repo.as_ref().map(|repo| String::as_str(repo));
let repo_id = opt.repo.as_deref();
let mut ui = NoYaml {
state: State::EditRepo,

View File

@ -26,14 +26,14 @@ impl Details {
let mut lines = vec![format!("{:^10}|{:^6}|{:^6}", "ARCH", "OS", "SIZE")];
for d in &self.details {
lines.push(format!(
"{:^10}|{:^6}|{:^6}",
"{:^10}|{:^6}|{:^6}MB",
format!(
"{}{}",
d.arch.clone().unwrap_or_default(),
d.variant.clone().unwrap_or_default()
),
d.os.clone().unwrap_or_default(),
format!("{}MB", d.size.unwrap_or_default() / 1024 / 1024)
d.size.unwrap_or_default() / 1024 / 1024,
));
}
lines