2cb7d441dc
Right now, we write code like ```rust match q_once(q, inputs)?.into_tuple()? { Some(vs) => match (vs.len(), vs.get(0), vs.get(1)) { (2, &Some(Binding::Scalar(TypedValue::Long(a))), &Some(Binding::Scalar(TypedValue::Instant(ref b)))) => Some((a, b.clone())), _ => panic!(), }, None => None, } ``` to length-check tuples coming out of the database. It can also lead to a lot of cloning because references are the easiest thing to hand. This commit allows to write code like ```rust match q_once(q, inputs)?.into_tuple()? { Some((Binding::Scalar(TypedValue::Long(a)), Binding::Scalar(TypedValue::Instant(b)))) => Some((a, b)), Some(_) => panic!(), None => None, } ``` which is generally much easier to reason about. |
||
---|---|---|
.. | ||
projectors | ||
aggregates.rs | ||
binding_tuple.rs | ||
errors.rs | ||
lib.rs | ||
project.rs | ||
pull.rs | ||
relresult.rs |