mysql::PooledConn docs wrongfully suggest "prepare" and "prep_exec"

The latest doc pages for the PooledConnection of the mysql crate still suggest to make use of "prepare" and "prep_exec":

https://docs.rs/mysql/20.1.0/mysql/struct.PooledConn.html

"You should prefer using prepare or prep_exec instead of query where possible, except cases when statement has no params and when it has no return values or return values which evaluates to Value::Bytes"

This is wrong ever since those functions were deprecated and/or moved to mysql::prelude::Queryable under different names.

A better and up-to-date hint would be:

"You should prefer using prep along exec instead of query from the Queryable trait where possible, except cases when statement has no params and when it has no return values or return values which evaluates to Value::Bytes"

On a side note, it is very unintuitive to not have the implemented functions from traits in the side bar nor have them searchable on the page, because they are hidden behind a collapsed " [Hide undocumented items]". It is hard to figure out which functions are available for the class in the first place, even if the hint section would use up-to-date functions.

That said, I really like my first contact to Rust conceptual wise. It takes some more time to get used to the heavy wrapping, but I'll get there.

This forum is for discussing changes to the rust language itself, not for things related to external crates. For that, you should post on users.rust-lang.org. In this case, you may want to directly open an issue on the repo of the mysql crate: Issues · blackbeam/rust-mysql-simple · GitHub

7 Likes