mentat/src
Nick Alexander 2cb7d441dc Part 2: Make it easier to match tuple results.
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.
2018-07-05 16:45:42 -07:00
..
conn.rs Add last_tx_id. 2018-07-05 16:45:42 -07:00
entity_builder.rs Part 7: Improve TermBuilder interface; expose lookup refs and tx functions. 2018-07-05 16:33:51 -07:00
errors.rs Pre: Fix error printing rusqlite::Error. 2018-06-30 14:58:23 -07:00
lib.rs Part 2: Make it easier to match tuple results. 2018-07-05 16:45:42 -07:00
query.rs Part 1: Expand Binding::val() into Binding::{into_*,as_*}. 2018-07-05 16:45:42 -07:00
query_builder.rs Convert src/ to failure. 2018-06-20 14:42:18 -07:00
store.rs Add last_tx_id. 2018-07-05 16:45:42 -07:00
vocabulary.rs Part 1: Expand Binding::val() into Binding::{into_*,as_*}. 2018-07-05 16:45:42 -07:00