clippy
This commit is contained in:
parent
0ce914b57a
commit
76930d8624
58 changed files with 173 additions and 183 deletions
|
|
@ -29,7 +29,7 @@ pub fn icon<'a, Message>(handle: impl Into<Handle>) -> Button<'a, Message> {
|
|||
})
|
||||
}
|
||||
|
||||
impl<'a, Message> Button<'a, Message> {
|
||||
impl<Message> Button<'_, Message> {
|
||||
pub fn new(icon: Icon) -> Self {
|
||||
let guard = crate::theme::THEME.lock().unwrap();
|
||||
let theme = guard.cosmic();
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright 2023 System76 <info@system76.com>
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use super::{Builder, Style};
|
||||
use super::Builder;
|
||||
use crate::{
|
||||
widget::{self, image::Handle},
|
||||
Element,
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ pub struct Builder<'a, Message, Variant> {
|
|||
variant: Variant,
|
||||
}
|
||||
|
||||
impl<'a, Message, Variant> Builder<'a, Message, Variant> {
|
||||
impl<Message, Variant> Builder<'_, Message, Variant> {
|
||||
/// Set the value of [`on_press`] as either `Some` or `None`.
|
||||
pub fn on_press_maybe(mut self, on_press: Option<Message>) -> Self {
|
||||
self.on_press = on_press;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright 2023 System76 <info@system76.com>
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use super::{Builder, ButtonClass, Style};
|
||||
use super::{Builder, ButtonClass};
|
||||
use crate::widget::{icon, row, tooltip};
|
||||
use crate::{ext::CollectionWidget, Element};
|
||||
use apply::Apply;
|
||||
|
|
@ -42,6 +42,12 @@ pub struct Text {
|
|||
pub(super) trailing_icon: Option<icon::Handle>,
|
||||
}
|
||||
|
||||
impl Default for Text {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl Text {
|
||||
pub const fn new() -> Self {
|
||||
Self {
|
||||
|
|
@ -51,7 +57,7 @@ impl Text {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, Message> Button<'a, Message> {
|
||||
impl<Message> Button<'_, Message> {
|
||||
pub fn new(text: Text) -> Self {
|
||||
let guard = crate::theme::THEME.lock().unwrap();
|
||||
let theme = guard.cosmic();
|
||||
|
|
|
|||
|
|
@ -596,7 +596,7 @@ impl<'a, Message: 'a + Clone> Widget<Message, crate::Theme, crate::Renderer>
|
|||
node.set_described_by(
|
||||
id.iter()
|
||||
.cloned()
|
||||
.map(|id| NodeId::from(id))
|
||||
.map(NodeId::from)
|
||||
.collect::<Vec<_>>(),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue