fixed clippy warnings
This commit is contained in:
parent
d1ef5c6755
commit
88070489f3
@ -54,7 +54,7 @@ impl std::iter::Iterator for State {
|
|||||||
|
|
||||||
impl Ui {
|
impl Ui {
|
||||||
pub fn run(opt: &Opt) {
|
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 {
|
let mut ui = Ui {
|
||||||
state: State::SelectService,
|
state: State::SelectService,
|
||||||
|
@ -49,7 +49,7 @@ pub struct NoYaml {
|
|||||||
|
|
||||||
impl NoYaml {
|
impl NoYaml {
|
||||||
pub fn run(opt: &Opt) {
|
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 {
|
let mut ui = NoYaml {
|
||||||
state: State::EditRepo,
|
state: State::EditRepo,
|
||||||
|
@ -26,14 +26,14 @@ impl Details {
|
|||||||
let mut lines = vec![format!("{:^10}|{:^6}|{:^6}", "ARCH", "OS", "SIZE")];
|
let mut lines = vec![format!("{:^10}|{:^6}|{:^6}", "ARCH", "OS", "SIZE")];
|
||||||
for d in &self.details {
|
for d in &self.details {
|
||||||
lines.push(format!(
|
lines.push(format!(
|
||||||
"{:^10}|{:^6}|{:^6}",
|
"{:^10}|{:^6}|{:^6}MB",
|
||||||
format!(
|
format!(
|
||||||
"{}{}",
|
"{}{}",
|
||||||
d.arch.clone().unwrap_or_default(),
|
d.arch.clone().unwrap_or_default(),
|
||||||
d.variant.clone().unwrap_or_default()
|
d.variant.clone().unwrap_or_default()
|
||||||
),
|
),
|
||||||
d.os.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
|
lines
|
||||||
|
Loading…
Reference in New Issue
Block a user