diff options
author | Teddy Wing | 2022-03-21 01:07:51 +0100 |
---|---|---|
committer | Teddy Wing | 2022-03-21 01:11:49 +0100 |
commit | 52a85daa1f7e0c00abc95f5380613b5296b50b30 (patch) | |
tree | 46f4db9d3774cac3ebdb763b4bb77acb78d5bd95 | |
parent | a6466ef5603f7ebf33e5eed15e6e370e32fd59d8 (diff) | |
download | yaqlite-52a85daa1f7e0c00abc95f5380613b5296b50b30.tar.bz2 |
select: Fix test by adding new argument
We added a new argument to the `select()` functions in
f30a4dafa5736c58bda54569ec9f46e6fdb2e200 to allow columns to be excluded
from the YAML output. Update the test to include the new argument in its
call.
I was getting this error about the `C` type parameter on the function:
error[E0282]: type annotations needed
--> src/select.rs:152:23
|
152 | let got = select(&conn, "test", "1", None).unwrap();
| ^^^^^^ cannot infer type for type parameter `C` declared on the function `select`
For more information about this error, try `rustc --explain E0282`.
The error makes sense in a way, but it also doesn't at all, because I'm
not passing a `Some` value into the function. If it's a `None`, then
what need is there to specify a type that's never used?
I wonder if there's a way to get this to work in a way that doesn't
require me to specify the type parameter when passing `None` for
`exclude_columns`.
-rw-r--r-- | src/select.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/select.rs b/src/select.rs index cc82cb5..b00733b 100644 --- a/src/select.rs +++ b/src/select.rs @@ -149,7 +149,7 @@ With multiple paragraphs.".to_owned(), rusqlite::params![record.count, record.description], ).unwrap(); - let got = select(&conn, "test", "1").unwrap(); + let got = select::<String>(&conn, "test", "1", None).unwrap(); assert_eq!(expected, got); } |