aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorTeddy Wing2022-03-19 04:06:15 +0100
committerTeddy Wing2022-03-19 04:06:15 +0100
commit1b467a73e02c89b4b6b63957d6f68c620c6fcb44 (patch)
tree00641f551aa7f62ccfef460e286b783ad66560ff /src/lib.rs
parentd78addd46aa7633346c47dd310c972ef0e9029fa (diff)
downloadyaqlite-1b467a73e02c89b4b6b63957d6f68c620c6fcb44.tar.bz2
select(): Change `column_names` to `Vec<String>`
Change `column_names` from `Vec<yaml_rust::Yaml::String>` to `Vec<String>`. This way we don't have to clone the `yaml_rust::Yaml` value to insert into the `yaml_rust::yaml::Hash`. Had some issues getting this to work. I tried calling `stmt.column_names()` on its own, but this caused a borrow checker error, as that creates an immutable borrow, while the `stmt.query_map()` call is a mutable borrow, and we can't do both. Found this ticket that describes exactly the problem I was having: https://github.com/rusqlite/rusqlite/pull/523 Turns out I had the right idea to begin with: I needed to collect the column names into a `Vec`. But don't use a `Vec` of `yaml_rust::Yaml` values, because that requires excess cloning.
Diffstat (limited to 'src/lib.rs')
0 files changed, 0 insertions, 0 deletions