forked from StudioInfinity/dyna3
refactor: Code formatting (#108)
Primarily, switch to using trailing commas. Also uniformizes commas with respect to switch branches, makes function call layout more consistent, line breaking more consistent, alphabetizes imports, uses the field init shorthand when possible, etc. Resolves #99. Co-authored-by: Aaron Fenyes <aaron.fenyes@fareycircles.ooo> Reviewed-on: StudioInfinity/dyna3#108 Co-authored-by: Vectornaut <vectornaut@nobody@nowhere.net> Co-committed-by: Vectornaut <vectornaut@nobody@nowhere.net>
This commit is contained in:
parent
2eba80fb69
commit
ef1a579ac0
12 changed files with 310 additions and 297 deletions
|
@ -13,7 +13,7 @@ use std::num::ParseFloatError;
|
|||
#[readonly::make]
|
||||
pub struct SpecifiedValue {
|
||||
pub spec: String,
|
||||
pub value: Option<f64>
|
||||
pub value: Option<f64>,
|
||||
}
|
||||
|
||||
impl SpecifiedValue {
|
||||
|
@ -37,7 +37,7 @@ impl TryFrom<String> for SpecifiedValue {
|
|||
Ok(SpecifiedValue::from_empty_spec())
|
||||
} else {
|
||||
spec.parse::<f64>().map(
|
||||
|value| SpecifiedValue { spec: spec, value: Some(value) }
|
||||
|value| SpecifiedValue { spec, value: Some(value) }
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue