mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-15 17:20:08 +00:00
apply clippy optimizations
This commit is contained in:
parent
8ec4b467ce
commit
5ae2c2327a
@ -67,7 +67,7 @@ impl Gemini {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Init tooltip components
|
// Init tooltip components
|
||||||
let mut tooltip = format!("<b>Certificate</b>\n");
|
let mut tooltip = "<b>Certificate</b>\n".to_string();
|
||||||
|
|
||||||
if let Some(subject_name) = certificate.subject_name() {
|
if let Some(subject_name) = certificate.subject_name() {
|
||||||
tooltip
|
tooltip
|
||||||
@ -110,7 +110,7 @@ impl Gemini {
|
|||||||
scope.push(format!("<small>{}</small>", auth.scope.clone()))
|
scope.push(format!("<small>{}</small>", auth.scope.clone()))
|
||||||
}
|
}
|
||||||
|
|
||||||
if scope.len() > 0 {
|
if !scope.is_empty() {
|
||||||
tooltip.push_str(&format!("\n\n<b>Scope</b>\n\n{}", scope.join("\n")));
|
tooltip.push_str(&format!("\n\n<b>Scope</b>\n\n{}", scope.join("\n")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,13 +37,7 @@ impl Item {
|
|||||||
)
|
)
|
||||||
.property("title", title)
|
.property("title", title)
|
||||||
.property("subtitle", subtitle)
|
.property("subtitle", subtitle)
|
||||||
.property(
|
.property("tooltip", tooltip.unwrap_or_default())
|
||||||
"tooltip",
|
|
||||||
match tooltip {
|
|
||||||
Some(text) => text,
|
|
||||||
None => "", // NULL
|
|
||||||
},
|
|
||||||
)
|
|
||||||
.property("is_active", is_active)
|
.property("is_active", is_active)
|
||||||
.build()
|
.build()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user