Rewind through the descent history
All checks were successful
/ test (pull_request) Successful in 3m47s
All checks were successful
/ test (pull_request) Successful in 3m47s
This commit is contained in:
parent
af18a8e7d1
commit
36036141b5
6 changed files with 152 additions and 19 deletions
|
@ -26,6 +26,17 @@ impl SpecifiedValue {
|
|||
}
|
||||
}
|
||||
|
||||
// a `SpecifiedValue` can be constructed from a floating-point option, which is
|
||||
// given a canonical specification
|
||||
impl From<Option<f64>> for SpecifiedValue {
|
||||
fn from(value: Option<f64>) -> Self {
|
||||
match value {
|
||||
Some(x) => SpecifiedValue{ spec: x.to_string(), value },
|
||||
None => SpecifiedValue::from_empty_spec(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// a `SpecifiedValue` can be constructed from a specification string, formatted
|
||||
// as described in the comment on the structure definition. the result is `Ok`
|
||||
// if the specification is properly formatted, and `Error` if not
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue