fix clippy issues
This commit is contained in:
@@ -12,11 +12,13 @@ pub struct Breadcrumb {
|
||||
items: Vec<BreadcrumbItem>,
|
||||
}
|
||||
|
||||
type OnClick = Option<Rc<dyn Fn(&ClickEvent, &mut WindowContext)>>;
|
||||
|
||||
#[derive(IntoElement)]
|
||||
pub struct BreadcrumbItem {
|
||||
id: ElementId,
|
||||
text: SharedString,
|
||||
on_click: Option<Rc<dyn Fn(&ClickEvent, &mut WindowContext)>>,
|
||||
on_click: OnClick,
|
||||
disabled: bool,
|
||||
is_last: bool,
|
||||
}
|
||||
@@ -46,6 +48,7 @@ impl BreadcrumbItem {
|
||||
}
|
||||
|
||||
/// For internal use only.
|
||||
#[allow(clippy::wrong_self_convention)]
|
||||
fn is_last(mut self, is_last: bool) -> Self {
|
||||
self.is_last = is_last;
|
||||
self
|
||||
@@ -84,6 +87,12 @@ impl Breadcrumb {
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for Breadcrumb {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(IntoElement)]
|
||||
struct BreadcrumbSeparator;
|
||||
impl RenderOnce for BreadcrumbSeparator {
|
||||
|
||||
Reference in New Issue
Block a user