rfluids 0.3.1

🦀 Rusty CoolProp wrapper
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::ops::{Div, Mul};

pub(crate) fn mul<L, R, O, E>(lhs: Result<L, E>, rhs: Result<R, E>) -> Result<O, E>
where
    L: Mul<R, Output = O>,
{
    lhs.and_then(|l| rhs.map(|r| l * r))
}

pub(crate) fn div<L, R, O, E>(lhs: Result<L, E>, rhs: Result<R, E>) -> Result<O, E>
where
    L: Div<R, Output = O>,
{
    lhs.and_then(|l| rhs.map(|r| l / r))
}