Koka / odbc-rs

Rust ODBC FFI binding
MIT License
103 stars 31 forks source link

Code in Readme: wrong number of type arguments: expected 1, found 0 #129

Closed Daevor closed 4 years ago

Daevor commented 4 years ago

When attempting to compile the code in the Readme, I get the following error:

error[E0107]: wrong number of type arguments: expected 1, found 0
  --> src\main.rs:30:35
   |
30 | fn execute_statement<'env>(conn: &Connection<'env>) -> Result<()> {
   |                                   ^^^^^^^^^^^^^^^^ expected 1 type argument

I have added the following dependencies to the Cargo.toml file:

[dependencies]
odbc = "0.15.0"
log = "0.4.0"
env_logger = "0.7.1"

My main.rs is exactly the code in the Readme file.

Compiler version:

C:\dev\rust\playground
λ cargo --version
cargo 1.39.0 (1c6ec66d5 2019-09-30)

C:\dev\rust\playground
λ rustc --version
rustc 1.39.0 (4560ea788 2019-11-04)
Koka commented 4 years ago

Thanks @Daevor - you’re right, code in read me is a bit outdated, you can always find actual code in examples folder in this repo

jpastuszek commented 4 years ago

I get this after running cargo update on a project that was compiling fine. Looks like you made an incompatible change and did not follow semver?

Koka commented 4 years ago

@jpastuszek That was done accidentally on 0.14 branch, but should be fixed by 0.14.2, try refreshing the lockfile

Koka commented 4 years ago

Readme is fixed and included into doctests