title: Cannot call rusqlite's query because it expects the type &[&rusqlite::types::ToSql]
body: <p>I want to use a prepared statement with <a href="https://github.com/jgallagher/rusqlite" rel="nofollow noreferrer" title="rusqlite">rusqlite</a>. Rusqlite implements the trait <code>ToSql</code> for <code>String</code>, <code>&amp;str</code> and <a href="https://github.com/jgallagher/rusqlite/blob/master/src/types/to_sql.rs" rel="nofollow noreferrer">a bunch of other types</a>:</p>
  
  <pre><code>extern crate rusqlite;
  
  use rusqlite::Connection;
  
  fn main() {
      let mut connection = Connection::open("C:\\test_db.db").unwrap();
  
      let mut cached_statement = connection
          .prepare_cached("SELECT ?, ?, ? FROM test")
          .unwrap();
  
      let vec_values = vec![
          &amp;"test1".to_string(),
          &amp;"test2".to_string(),
          &amp;"test3".to_string(),
      ];
  
      let rows = cached_statement.query(vec_values.as_slice()).unwrap();
  }
  </code></pre>
  
  <p>This does not compile with the error:</p>
  
  <pre class="lang-none prettyprint-override"><code>error[E0308]: mismatched types
    --&gt; src/main.rs:18:39
     |
  18 |     let rows = cached_statement.query(vec_values.as_slice()).unwrap();
     |                                       ^^^^^^^^^^^^^^^^^^^^^ expected trait rusqlite::types::ToSql, found struct `std::string::String`
     |
     = note: expected type `&amp;[&amp;rusqlite::types::ToSql]`
                found type `&amp;[&amp;std::string::String]`
  </code></pre>