fixed clippy warnings
This commit is contained in:
parent
d1ef5c6755
commit
88070489f3
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user