chore: update derive_more to 1.0
This commit is contained in:
parent
4288771181
commit
fdac6b5cd9
5 changed files with 33 additions and 25 deletions
22
Cargo.lock
generated
22
Cargo.lock
generated
|
@ -599,12 +599,6 @@ dependencies = [
|
||||||
"windows-sys 0.52.0",
|
"windows-sys 0.52.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "convert_case"
|
|
||||||
version = "0.4.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "core-foundation-sys"
|
name = "core-foundation-sys"
|
||||||
version = "0.8.6"
|
version = "0.8.6"
|
||||||
|
@ -760,15 +754,23 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "derive_more"
|
name = "derive_more"
|
||||||
version = "0.99.18"
|
version = "1.0.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce"
|
checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05"
|
||||||
|
dependencies = [
|
||||||
|
"derive_more-impl",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "derive_more-impl"
|
||||||
|
version = "1.0.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"convert_case",
|
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"rustc_version",
|
|
||||||
"syn 2.0.72",
|
"syn 2.0.72",
|
||||||
|
"unicode-xid",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
|
@ -17,7 +17,13 @@ chrono-tz = "0.9.0"
|
||||||
clap = { version = "4.5.1", features = ["derive"] }
|
clap = { version = "4.5.1", features = ["derive"] }
|
||||||
clap_complete = "4.5.12"
|
clap_complete = "4.5.12"
|
||||||
codespan-reporting = "0.11"
|
codespan-reporting = "0.11"
|
||||||
derive_more = "0.99"
|
derive_more = { version = "1", features = [
|
||||||
|
"as_ref",
|
||||||
|
"debug",
|
||||||
|
"display",
|
||||||
|
"from",
|
||||||
|
"from_str",
|
||||||
|
] }
|
||||||
extend = "1.2"
|
extend = "1.2"
|
||||||
futures = "0.3.30"
|
futures = "0.3.30"
|
||||||
grass = "0.13.4"
|
grass = "0.13.4"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use derive_more::*;
|
use derive_more::{Debug, *};
|
||||||
|
|
||||||
#[derive(Debug, Copy, Clone, Eq, PartialEq, Display)]
|
#[derive(Debug, Copy, Clone, Eq, PartialEq, Display)]
|
||||||
#[display(fmt = ".x*.y:.width*.height")]
|
#[display(".x*.y:.width*.height")]
|
||||||
pub struct Rect {
|
pub struct Rect {
|
||||||
pub x: i32,
|
pub x: i32,
|
||||||
pub y: i32,
|
pub y: i32,
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
use derive_more::*;
|
use derive_more::{Debug, *};
|
||||||
use ref_cast::RefCast;
|
use ref_cast::RefCast;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
/// The name of a variable
|
/// The name of a variable
|
||||||
#[repr(transparent)]
|
#[repr(transparent)]
|
||||||
#[derive(Clone, Hash, PartialEq, Eq, Serialize, Deserialize, AsRef, From, FromStr, Display, DebugCustom, RefCast)]
|
#[derive(Clone, Hash, PartialEq, Eq, Serialize, Deserialize, AsRef, From, FromStr, Display, Debug, RefCast)]
|
||||||
#[debug(fmt = "VarName({})", .0)]
|
#[debug("VarName({})", _0)]
|
||||||
pub struct VarName(pub String);
|
pub struct VarName(pub String);
|
||||||
|
|
||||||
impl std::borrow::Borrow<str> for VarName {
|
impl std::borrow::Borrow<str> for VarName {
|
||||||
|
@ -34,8 +34,8 @@ impl From<AttrName> for VarName {
|
||||||
|
|
||||||
/// The name of an attribute
|
/// The name of an attribute
|
||||||
#[repr(transparent)]
|
#[repr(transparent)]
|
||||||
#[derive(Clone, Hash, PartialEq, Eq, Serialize, Deserialize, AsRef, From, FromStr, Display, DebugCustom, RefCast)]
|
#[derive(Clone, Hash, PartialEq, Eq, Serialize, Deserialize, AsRef, From, FromStr, Display, Debug, RefCast)]
|
||||||
#[debug(fmt="AttrName({})", .0)]
|
#[debug("AttrName({})", _0)]
|
||||||
pub struct AttrName(pub String);
|
pub struct AttrName(pub String);
|
||||||
|
|
||||||
impl AttrName {
|
impl AttrName {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use derive_more::*;
|
use derive_more::{Debug, *};
|
||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use smart_default::SmartDefault;
|
use smart_default::SmartDefault;
|
||||||
|
@ -14,13 +14,13 @@ pub enum Error {
|
||||||
MalformedCoords,
|
MalformedCoords,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, PartialEq, Deserialize, Serialize, Display, DebugCustom, SmartDefault)]
|
#[derive(Clone, Copy, PartialEq, Deserialize, Serialize, Display, Debug, SmartDefault)]
|
||||||
pub enum NumWithUnit {
|
pub enum NumWithUnit {
|
||||||
#[display(fmt = "{}%", .0)]
|
#[display("{}%", _0)]
|
||||||
#[debug(fmt = "{}%", .0)]
|
#[debug("{}%", _0)]
|
||||||
Percent(f32),
|
Percent(f32),
|
||||||
#[display(fmt = "{}px", .0)]
|
#[display("{}px", _0)]
|
||||||
#[debug(fmt = "{}px", .0)]
|
#[debug("{}px", _0)]
|
||||||
#[default]
|
#[default]
|
||||||
Pixels(i32),
|
Pixels(i32),
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ impl FromStr for NumWithUnit {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, PartialEq, Deserialize, Serialize, Display, Default)]
|
#[derive(Clone, Copy, PartialEq, Deserialize, Serialize, Display, Default)]
|
||||||
#[display(fmt = "{}*{}", x, y)]
|
#[display("{}*{}", x, y)]
|
||||||
pub struct Coords {
|
pub struct Coords {
|
||||||
pub x: NumWithUnit,
|
pub x: NumWithUnit,
|
||||||
pub y: NumWithUnit,
|
pub y: NumWithUnit,
|
||||||
|
|
Loading…
Add table
Reference in a new issue