Add vitamin_d

This commit is contained in:
Knyffen 2024-10-19 18:05:03 +02:00
parent 09987b8630
commit 81be549ac9
4 changed files with 10 additions and 5 deletions

View File

@ -853,12 +853,12 @@ function __wbg_get_imports() {
const ret = wasm.memory;
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper201 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 43, __wbg_adapter_36);
imports.wbg.__wbindgen_closure_wrapper199 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 33, __wbg_adapter_36);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper202 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 43, __wbg_adapter_39);
imports.wbg.__wbindgen_closure_wrapper200 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 33, __wbg_adapter_39);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper1797 = function(arg0, arg1, arg2) {

Binary file not shown.

View File

@ -69,6 +69,7 @@ pub fn init_camera_feed(product_options_js: JsValue) -> Result<(), String> {
vitamin_b12: 0.,
calcium: 0.,
phosphor: 0.,
vitamin_d: 0.,
};
product_options.push(test);

View File

@ -31,6 +31,7 @@ pub struct Nutrition {
pub vitamin_b12: f32,
pub calcium: f32,
pub phosphor: f32,
pub vitamin_d: f32,
}
#[cfg(feature = "sql")]
@ -53,6 +54,7 @@ type RowType = HList!(
Option<f32>,
Option<f32>,
Option<f32>,
Option<f32>,
);
impl Nutrition {
@ -88,7 +90,8 @@ impl Nutrition {
vitamin_b2,
vitamin_b12,
calcium,
phosphor
phosphor,
vitamin_d,
] = row;
Nutrition {
id,
@ -109,6 +112,7 @@ impl Nutrition {
vitamin_b12: vitamin_b12.unwrap_or(0.),
calcium: calcium.unwrap_or(0.),
phosphor: phosphor.unwrap_or(0.),
vitamin_d: vitamin_d.unwrap_or(0.),
}
};