useless conversion

This commit is contained in:
Magnus Ulimoen 2021-06-29 18:07:26 +02:00
parent b5360af6de
commit 8873f458b4
2 changed files with 3 additions and 3 deletions

View File

@ -256,7 +256,7 @@ pub fn default_context() -> HashMapContext {
});
}
let b = arg[0].as_boolean()?;
if b.into() {
if b {
Ok(arg[1].clone())
} else {
Ok(arg[2].clone())

View File

@ -224,7 +224,7 @@ pub(crate) fn diff_op_2d_fallback<const M: usize, const N: usize, const D: usize
};
let idx = 1.0 / dx;
fut.fill(0.0.into());
fut.fill(0.0);
let (mut fut0, mut futmid, mut futn) = fut.multi_slice_mut((
ndarray::s![.., ..M],
ndarray::s![.., M..nx - M],
@ -301,7 +301,7 @@ pub(crate) fn diff_op_2d_sliceable_y<const M: usize, const N: usize, const D: us
};
let idx = 1.0 / dx;
fut.fill(0.0.into());
fut.fill(0.0);
let (mut fut0, mut futmid, mut futn) = fut.multi_slice_mut((
ndarray::s![.., ..M],
ndarray::s![.., M..nx - M],