forked from StudioInfinity/dyna3
Compare commits
No commits in common. "08ec838334a5fc1bfe7961ba7047c3b60c8e70fb" and "6eeeb1c6fddc2c4122ec2eaf9146a0c839bf7def" have entirely different histories.
08ec838334
...
6eeeb1c6fd
3 changed files with 10 additions and 3 deletions
|
@ -4,7 +4,10 @@ use web_sys::{console, wasm_bindgen::JsValue};
|
|||
use crate::{
|
||||
engine,
|
||||
AppState,
|
||||
assembly::{Assembly, Element}
|
||||
assembly::{
|
||||
Assembly,
|
||||
Element
|
||||
}
|
||||
};
|
||||
|
||||
/* DEBUG */
|
||||
|
|
|
@ -9,7 +9,11 @@ use web_sys::{
|
|||
use crate::{
|
||||
AppState,
|
||||
assembly,
|
||||
assembly::{ElementKey, Regulator, RegulatorKey},
|
||||
assembly::{
|
||||
ElementKey,
|
||||
Regulator,
|
||||
RegulatorKey
|
||||
},
|
||||
specified::SpecifiedValue
|
||||
};
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ impl TryFrom<String> for SpecifiedValue {
|
|||
|
||||
fn try_from(spec: String) -> Result<Self, Self::Error> {
|
||||
if spec.is_empty() {
|
||||
Ok(SpecifiedValue::from_empty_spec())
|
||||
Ok(SpecifiedValue { spec: spec, value: None })
|
||||
} else {
|
||||
spec.parse::<f64>().map(
|
||||
|value| SpecifiedValue { spec: spec, value: Some(value) }
|
||||
|
|
Loading…
Add table
Reference in a new issue