Added support for named parameters #260
clippy
208 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 208 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.85.0 (4d91de4e4 2025-02-17)
- cargo 1.85.0 (d73d2caf9 2024-12-31)
- clippy 0.1.85 (4d91de4e48 2025-02-17)
Annotations
Check warning on line 238 in src/driver/listener/core.rs
github-actions / clippy
unused `async` for function with no await statements
warning: unused `async` for function with no await statements
--> src/driver/listener/core.rs:232:5
|
232 | / async fn shutdown(&mut self) {
233 | | self.abort_listen();
234 | | std::mem::take(&mut self.connection);
235 | | std::mem::take(&mut self.receiver);
236 | |
237 | | self.is_started = false;
238 | | }
| |_____^
|
= help: consider removing the `async` from this function
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_async
= note: `-W clippy::unused-async` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::unused_async)]`
Check warning on line 671 in src/value_converter.rs
github-actions / clippy
docs for function returning `Result` missing `# Errors` section
warning: docs for function returning `Result` missing `# Errors` section
--> src/value_converter.rs:669:1
|
669 | / pub fn convert_seq_parameters(
670 | | seq_params: Vec<Py<PyAny>>,
671 | | ) -> RustPSQLDriverPyResult<Vec<PythonDTO>> {
| |___________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
Check warning on line 660 in src/value_converter.rs
github-actions / clippy
useless conversion to the same type: `std::string::String`
warning: useless conversion to the same type: `std::string::String`
--> src/value_converter.rs:660:21
|
660 | format!("Cannot find parameter with name <{param_name}> in parameters").into(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `format!("Cannot find parameter with name <{param_name}> in parameters")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `-W clippy::useless-conversion` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::useless_conversion)]`
Check warning on line 648 in src/value_converter.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'a
warning: the following explicit lifetimes could be elided: 'a
--> src/value_converter.rs:648:34
|
648 | pub fn convert_kwargs_parameters<'a>(
| ^^
649 | kw_params: &Bound<'_, PyMapping>,
650 | querystring: &'a str,
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
= note: `-W clippy::needless-lifetimes` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::needless_lifetimes)]`
help: elide the lifetimes
|
648 ~ pub fn convert_kwargs_parameters(
649 | kw_params: &Bound<'_, PyMapping>,
650 ~ querystring: &str,
|
Check warning on line 651 in src/value_converter.rs
github-actions / clippy
docs for function returning `Result` missing `# Errors` section
warning: docs for function returning `Result` missing `# Errors` section
--> src/value_converter.rs:648:1
|
648 | / pub fn convert_kwargs_parameters<'a>(
649 | | kw_params: &Bound<'_, PyMapping>,
650 | | querystring: &'a str,
651 | | ) -> RustPSQLDriverPyResult<(String, Vec<PythonDTO>)> {
| |_____________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
Check warning on line 44 in src/value_converter.rs
github-actions / clippy
calling `HashMap::default()` is more clear than this expression
warning: calling `HashMap::default()` is more clear than this expression
--> src/value_converter.rs:44:30
|
44 | Lazy::new(|| RwLock::new(Default::default()));
| ^^^^^^^^^^^^^^^^^^ help: try: `HashMap::default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_trait_access
= note: `-W clippy::default-trait-access` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::default_trait_access)]`
Check warning on line 43 in src/value_converter.rs
github-actions / clippy
very complex type used. Consider factoring parts into `type` definitions
warning: very complex type used. Consider factoring parts into `type` definitions
--> src/value_converter.rs:43:29
|
43 | static KWARGS_QUERYSTRINGS: Lazy<RwLock<HashMap<String, (String, Vec<String>)>>> =
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
= note: `-W clippy::type-complexity` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::type_complexity)]`
Check warning on line 764 in src/driver/transaction.rs
github-actions / clippy
this lifetime isn't used in the function definition
warning: this lifetime isn't used in the function definition
--> src/driver/transaction.rs:764:27
|
764 | pub async fn pipeline<'py>(
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
Check warning on line 300 in src/driver/transaction.rs
github-actions / clippy
this lifetime isn't used in the function definition
warning: this lifetime isn't used in the function definition
--> src/driver/transaction.rs:300:24
|
300 | async fn __aexit__<'a>(
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
Check warning on line 245 in src/driver/transaction.rs
github-actions / clippy
this lifetime isn't used in the function definition
warning: this lifetime isn't used in the function definition
--> src/driver/transaction.rs:245:25
|
245 | async fn __aenter__<'a>(self_: Py<Self>) -> RustPSQLDriverPyResult<Py<Self>> {
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
Check warning on line 233 in src/driver/transaction.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> src/driver/transaction.rs:233:9
|
233 | return self.pg_config.get_ports().iter().collect::<Vec<&u16>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
233 - return self.pg_config.get_ports().iter().collect::<Vec<&u16>>();
233 + self.pg_config.get_ports().iter().collect::<Vec<&u16>>()
|
Check warning on line 97 in src/driver/listener/core.rs
github-actions / clippy
this lifetime isn't used in the function definition
warning: this lifetime isn't used in the function definition
--> src/driver/listener/core.rs:97:24
|
97 | async fn __aexit__<'a>(
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
Check warning on line 92 in src/driver/listener/core.rs
github-actions / clippy
this lifetime isn't used in the function definition
warning: this lifetime isn't used in the function definition
--> src/driver/listener/core.rs:92:25
|
92 | async fn __aenter__<'a>(slf: Py<Self>) -> RustPSQLDriverPyResult<Py<Self>> {
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
Check warning on line 45 in src/driver/listener/core.rs
github-actions / clippy
this argument is passed by value, but not consumed in the function body
warning: this argument is passed by value, but not consumed in the function body
--> src/driver/listener/core.rs:45:27
|
45 | pub fn new(pg_config: Arc<Config>, ca_file: Option<String>, ssl_mode: Option<SslMode>) -> Self {
| ^^^^^^^^^^^ help: consider taking a reference instead: `&Arc<Config>`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
= note: `-W clippy::needless-pass-by-value` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::needless_pass_by_value)]`
Check warning on line 286 in src/driver/inner_connection.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> src/driver/inner_connection.rs:283:9
|
283 | / return Python::with_gil(|gil| match result.columns().first() {
284 | | Some(first_column) => postgres_to_py(gil, &result, first_column, 0, &None),
285 | | None => Ok(gil.None()),
286 | | });
| |__________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
283 ~ Python::with_gil(|gil| match result.columns().first() {
284 + Some(first_column) => postgres_to_py(gil, &result, first_column, 0, &None),
285 + None => Ok(gil.None()),
286 ~ })
|
Check warning on line 278 in src/driver/inner_connection.rs
github-actions / clippy
docs for function returning `Result` missing `# Errors` section
warning: docs for function returning `Result` missing `# Errors` section
--> src/driver/inner_connection.rs:273:5
|
273 | / pub async fn fetch_val(
274 | | &self,
275 | | querystring: String,
276 | | parameters: Option<pyo3::Py<PyAny>>,
277 | | prepared: Option<bool>,
278 | | ) -> RustPSQLDriverPyResult<Py<PyAny>> {
| |__________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
Check warning on line 270 in src/driver/inner_connection.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> src/driver/inner_connection.rs:270:9
|
270 | return Ok(PSQLDriverSinglePyQueryResult::new(result));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
270 - return Ok(PSQLDriverSinglePyQueryResult::new(result));
270 + Ok(PSQLDriverSinglePyQueryResult::new(result))
|
Check warning on line 265 in src/driver/inner_connection.rs
github-actions / clippy
docs for function returning `Result` missing `# Errors` section
warning: docs for function returning `Result` missing `# Errors` section
--> src/driver/inner_connection.rs:260:5
|
260 | / pub async fn fetch_row(
261 | | &self,
262 | | querystring: String,
263 | | parameters: Option<pyo3::Py<PyAny>>,
264 | | prepared: Option<bool>,
265 | | ) -> RustPSQLDriverPyResult<PSQLDriverSinglePyQueryResult> {
| |______________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
Check warning on line 257 in src/driver/inner_connection.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> src/driver/inner_connection.rs:257:9
|
257 | return Ok(result);
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
257 - return Ok(result);
257 + Ok(result)
|
Check warning on line 223 in src/driver/inner_connection.rs
github-actions / clippy
docs for function returning `Result` missing `# Errors` section
warning: docs for function returning `Result` missing `# Errors` section
--> src/driver/inner_connection.rs:218:5
|
218 | / pub async fn fetch_row_raw(
219 | | &self,
220 | | querystring: String,
221 | | parameters: Option<pyo3::Py<PyAny>>,
222 | | prepared: Option<bool>,
223 | | ) -> RustPSQLDriverPyResult<Row> {
| |____________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
Check warning on line 215 in src/driver/inner_connection.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> src/driver/inner_connection.rs:215:9
|
215 | return Ok(());
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
215 - return Ok(());
215 + Ok(())
|
Check warning on line 174 in src/driver/inner_connection.rs
github-actions / clippy
docs for function returning `Result` missing `# Errors` section
warning: docs for function returning `Result` missing `# Errors` section
--> src/driver/inner_connection.rs:169:5
|
169 | / pub async fn execute_many(
170 | | &self,
171 | | mut querystring: String,
172 | | parameters: Option<Vec<Py<PyAny>>>,
173 | | prepared: Option<bool>,
174 | | ) -> RustPSQLDriverPyResult<()> {
| |___________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
Check warning on line 132 in src/driver/inner_connection.rs
github-actions / clippy
docs for function returning `Result` missing `# Errors` section
warning: docs for function returning `Result` missing `# Errors` section
--> src/driver/inner_connection.rs:127:5
|
127 | / pub async fn execute(
128 | | &self,
129 | | querystring: String,
130 | | parameters: Option<pyo3::Py<PyAny>>,
131 | | prepared: Option<bool>,
132 | | ) -> RustPSQLDriverPyResult<PSQLDriverPyQueryResult> {
| |________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
Check warning on line 90 in src/driver/inner_connection.rs
github-actions / clippy
docs for function returning `Result` missing `# Errors` section
warning: docs for function returning `Result` missing `# Errors` section
--> src/driver/inner_connection.rs:85:5
|
85 | / pub async fn cursor_execute(
86 | | &self,
87 | | querystring: String,
88 | | parameters: Option<pyo3::Py<PyAny>>,
89 | | prepared: Option<bool>,
90 | | ) -> RustPSQLDriverPyResult<PSQLDriverPyQueryResult> {
| |________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
= note: `-W clippy::missing-errors-doc` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::missing_errors_doc)]`
Check warning on line 683 in src/driver/cursor.rs
github-actions / clippy
this lifetime isn't used in the function definition
warning: this lifetime isn't used in the function definition
--> src/driver/cursor.rs:683:37
|
683 | pub async fn fetch_backward_all<'a>(
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes