👷 Add cargo sort-derives tool
All checks were successful
ci/woodpecker/pr/validate Pipeline was successful
All checks were successful
ci/woodpecker/pr/validate Pipeline was successful
This commit is contained in:
@@ -5,6 +5,12 @@ steps:
|
|||||||
rustup component add rustfmt
|
rustup component add rustfmt
|
||||||
cargo fmt --all --check
|
cargo fmt --all --check
|
||||||
|
|
||||||
|
- name: lint - sort derives
|
||||||
|
image: rust:1.86
|
||||||
|
commands: |
|
||||||
|
cargo install --locked cargo-sort-derives
|
||||||
|
cargo sort-derives --check
|
||||||
|
|
||||||
- name: lint - clippy
|
- name: lint - clippy
|
||||||
image: rust:1.86
|
image: rust:1.86
|
||||||
commands: |
|
commands: |
|
||||||
|
@@ -21,7 +21,7 @@ use crate::infrastructure::services::mozaik_builder::create_mozaik;
|
|||||||
|
|
||||||
pub type RoomId = OwnedRoomId;
|
pub type RoomId = OwnedRoomId;
|
||||||
|
|
||||||
#[derive(PartialEq, Clone)]
|
#[derive(Clone, PartialEq)]
|
||||||
pub struct Invitation {
|
pub struct Invitation {
|
||||||
invitee_id: UserId,
|
invitee_id: UserId,
|
||||||
sender_id: UserId,
|
sender_id: UserId,
|
||||||
|
@@ -43,7 +43,7 @@ use super::{
|
|||||||
};
|
};
|
||||||
use crate::utils::oneshot;
|
use crate::utils::oneshot;
|
||||||
|
|
||||||
#[derive(thiserror::Error, Debug)]
|
#[derive(Debug, thiserror::Error)]
|
||||||
pub enum ClientError {
|
pub enum ClientError {
|
||||||
#[error("Matrix client error: {0}")]
|
#[error("Matrix client error: {0}")]
|
||||||
Matrix(#[from] matrix_sdk::Error),
|
Matrix(#[from] matrix_sdk::Error),
|
||||||
|
@@ -15,7 +15,7 @@ cfg_if! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Eq, PartialEq, Hash)]
|
#[derive(Eq, Hash, PartialEq)]
|
||||||
pub enum AvatarFeeling {
|
pub enum AvatarFeeling {
|
||||||
Ok,
|
Ok,
|
||||||
Warning,
|
Warning,
|
||||||
|
@@ -3,7 +3,7 @@ use dioxus_free_icons::{Icon, IconShape};
|
|||||||
|
|
||||||
turf::style_sheet!("src/ui/components/button.scss");
|
turf::style_sheet!("src/ui/components/button.scss");
|
||||||
|
|
||||||
#[derive(PartialEq, Clone, Props)]
|
#[derive(Clone, PartialEq, Props)]
|
||||||
struct _ButtonProps {
|
struct _ButtonProps {
|
||||||
children: Element,
|
children: Element,
|
||||||
#[props(default = false)]
|
#[props(default = false)]
|
||||||
@@ -15,7 +15,7 @@ struct _ButtonProps {
|
|||||||
|
|
||||||
macro_rules! svg_text_icon {
|
macro_rules! svg_text_icon {
|
||||||
($name:ident,$text:literal) => {
|
($name:ident,$text:literal) => {
|
||||||
#[derive(Copy, Clone, PartialEq)]
|
#[derive(Clone, Copy, PartialEq)]
|
||||||
struct $name;
|
struct $name;
|
||||||
impl IconShape for $name {
|
impl IconShape for $name {
|
||||||
fn view_box(&self) -> &str {
|
fn view_box(&self) -> &str {
|
||||||
@@ -67,7 +67,7 @@ macro_rules! svg_text_button {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(PartialEq, Clone, Props)]
|
#[derive(Clone, PartialEq, Props)]
|
||||||
pub struct ButtonProps {
|
pub struct ButtonProps {
|
||||||
#[props(default = false)]
|
#[props(default = false)]
|
||||||
focus: bool,
|
focus: bool,
|
||||||
|
@@ -87,7 +87,7 @@ const _PYRAMID_VIEWBOX_HEIGHT: i64 = (_PYRAMID_CENTRAL_EDGE_E2_Y + _PYRAMID_STRO
|
|||||||
const _PYRAMID_VIEWBOX_WIDTH: i64 = (_PYRAMID_RIGHT_EDGE_E2_X + _PYRAMID_STROKE_WIDTH) as i64;
|
const _PYRAMID_VIEWBOX_WIDTH: i64 = (_PYRAMID_RIGHT_EDGE_E2_X + _PYRAMID_STROKE_WIDTH) as i64;
|
||||||
const _PYRAMID_VIEWBOX: &str = formatcp!("0 0 {_PYRAMID_VIEWBOX_WIDTH} {_PYRAMID_VIEWBOX_HEIGHT}");
|
const _PYRAMID_VIEWBOX: &str = formatcp!("0 0 {_PYRAMID_VIEWBOX_WIDTH} {_PYRAMID_VIEWBOX_HEIGHT}");
|
||||||
|
|
||||||
#[derive(PartialEq, Clone)]
|
#[derive(Clone, PartialEq)]
|
||||||
struct PyramidShape {
|
struct PyramidShape {
|
||||||
color: String,
|
color: String,
|
||||||
ratio: f64,
|
ratio: f64,
|
||||||
@@ -154,7 +154,7 @@ impl IconShape for PyramidShape {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(PartialEq, Clone, Props)]
|
#[derive(Clone, PartialEq, Props)]
|
||||||
pub struct PyramidProps {
|
pub struct PyramidProps {
|
||||||
color: Option<String>,
|
color: Option<String>,
|
||||||
#[props(default = 0.5)]
|
#[props(default = 0.5)]
|
||||||
|
@@ -15,7 +15,7 @@ use style::{COLOR_CRITICAL_100, COLOR_SUCCESS_100, COLOR_WARNING_100};
|
|||||||
|
|
||||||
turf::style_sheet!("src/ui/components/modal.scss");
|
turf::style_sheet!("src/ui/components/modal.scss");
|
||||||
|
|
||||||
#[derive(Clone, Copy, Eq, PartialEq, Hash)]
|
#[derive(Clone, Copy, Eq, Hash, PartialEq)]
|
||||||
pub enum Severity {
|
pub enum Severity {
|
||||||
Ok,
|
Ok,
|
||||||
Warning,
|
Warning,
|
||||||
@@ -42,7 +42,7 @@ fn avatar_configs() -> &'static HashMap<Severity, AvatarConfig<'static>> {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Props, Clone, PartialEq)]
|
#[derive(Clone, PartialEq, Props)]
|
||||||
pub struct ModalProps {
|
pub struct ModalProps {
|
||||||
pub severity: Severity,
|
pub severity: Severity,
|
||||||
#[props(optional)]
|
#[props(optional)]
|
||||||
|
@@ -5,7 +5,7 @@ use crate::ui::components::icons::LogoShape;
|
|||||||
|
|
||||||
turf::style_sheet!("src/ui/components/spinner.scss");
|
turf::style_sheet!("src/ui/components/spinner.scss");
|
||||||
|
|
||||||
#[derive(PartialEq, Clone, Props)]
|
#[derive(Clone, PartialEq, Props)]
|
||||||
pub struct SpinnerProps {
|
pub struct SpinnerProps {
|
||||||
#[props(default = true)]
|
#[props(default = true)]
|
||||||
animate: bool,
|
animate: bool,
|
||||||
|
@@ -9,7 +9,7 @@ turf::style_sheet!("src/ui/components/text_input.scss");
|
|||||||
|
|
||||||
pub trait InputPropsData {}
|
pub trait InputPropsData {}
|
||||||
|
|
||||||
#[derive(Props, Clone, PartialEq)]
|
#[derive(Clone, PartialEq, Props)]
|
||||||
pub struct InputProps<D: InputPropsData + 'static + std::cmp::PartialEq + std::clone::Clone> {
|
pub struct InputProps<D: InputPropsData + 'static + std::cmp::PartialEq + std::clone::Clone> {
|
||||||
value: Option<String>,
|
value: Option<String>,
|
||||||
placeholder: Option<String>,
|
placeholder: Option<String>,
|
||||||
@@ -97,7 +97,7 @@ pub fn TextInput(props: InputProps<TextInputState>) -> Element {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Props, Clone, PartialEq)]
|
#[derive(Clone, PartialEq, Props)]
|
||||||
pub struct PasswordInputState {
|
pub struct PasswordInputState {
|
||||||
text_input_state: TextInputState,
|
text_input_state: TextInputState,
|
||||||
#[props(default = 0.0)]
|
#[props(default = 0.0)]
|
||||||
|
Reference in New Issue
Block a user