chore: Fix several style lints (#17488)

It's not comprehensive enough to start linting on `style` group, but
hey, it's a start.

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2024-09-06 11:58:39 +02:00 committed by GitHub
parent 93249fc82b
commit e6c1c51b37
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
361 changed files with 3530 additions and 3587 deletions

View file

@ -97,6 +97,12 @@ pub struct ModalHeader {
show_back_button: bool,
}
impl Default for ModalHeader {
fn default() -> Self {
Self::new()
}
}
impl ModalHeader {
pub fn new() -> Self {
Self {
@ -182,6 +188,12 @@ pub struct ModalRow {
children: SmallVec<[AnyElement; 2]>,
}
impl Default for ModalRow {
fn default() -> Self {
Self::new()
}
}
impl ModalRow {
pub fn new() -> Self {
Self {
@ -208,6 +220,12 @@ pub struct ModalFooter {
end_slot: Option<AnyElement>,
}
impl Default for ModalFooter {
fn default() -> Self {
Self::new()
}
}
impl ModalFooter {
pub fn new() -> Self {
Self {
@ -247,6 +265,12 @@ pub struct Section {
children: SmallVec<[AnyElement; 2]>,
}
impl Default for Section {
fn default() -> Self {
Self::new()
}
}
impl Section {
pub fn new() -> Self {
Self {
@ -381,15 +405,15 @@ impl RenderOnce for SectionHeader {
}
}
impl Into<SectionHeader> for SharedString {
fn into(self) -> SectionHeader {
SectionHeader::new(self)
impl From<SharedString> for SectionHeader {
fn from(val: SharedString) -> Self {
SectionHeader::new(val)
}
}
impl Into<SectionHeader> for &'static str {
fn into(self) -> SectionHeader {
let label: SharedString = self.into();
impl From<&'static str> for SectionHeader {
fn from(val: &'static str) -> Self {
let label: SharedString = val.into();
SectionHeader::new(label)
}
}