rustfmt and now grouping working

This commit is contained in:
elvis
2025-09-10 22:41:40 +02:00
parent 355857abff
commit 91f69c9e6d
30 changed files with 2368 additions and 1188 deletions

View File

@ -21,7 +21,18 @@ impl PrintableWithTranslator for IdType {
// -----------------------------------------------------------------------------
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
PartialOrd,
Ord,
Hash,
Serialize,
Deserialize,
)]
pub enum IdState {
Positive,
Negative,
@ -47,7 +58,18 @@ impl std::ops::Not for IdState {
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
PartialOrd,
Ord,
Hash,
Serialize,
Deserialize,
)]
pub struct PositiveType {
pub id: IdType,
pub state: IdState,
@ -70,12 +92,18 @@ impl PrintableWithTranslator for PositiveType {
impl From<(IdType, IdState)> for PositiveType {
fn from(value: (IdType, IdState)) -> Self {
Self { id: value.0, state: value.1 }
Self {
id: value.0,
state: value.1,
}
}
}
impl From<(&IdType, &IdState)> for PositiveType {
fn from(value: (&IdType, &IdState)) -> Self {
Self { id: *value.0, state: *value.1 }
Self {
id: *value.0,
state: *value.1,
}
}
}