From 52a85daa1f7e0c00abc95f5380613b5296b50b30 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Mon, 21 Mar 2022 01:07:51 +0100 Subject: 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`. --- src/select.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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::(&conn, "test", "1", None).unwrap(); assert_eq!(expected, got); } -- cgit v1.2.3