Refactor value converter #131
clippy
229 warnings
Details
Results
| Message level | Amount |
|---|---|
| Internal compiler error | 0 |
| Error | 0 |
| Warning | 229 |
| Note | 0 |
| Help | 0 |
Versions
- rustc 1.86.0 (05f9846f8 2025-03-31)
- cargo 1.86.0 (adf9b6ad1 2025-02-28)
- clippy 0.1.86 (05f9846f89 2025-03-31)
Annotations
Check warning on line 13 in src/value_converter/consts.rs
github-actions / clippy
this type has been superceded by `LazyLock` in the standard library
warning: this type has been superceded by `LazyLock` in the standard library
--> src/value_converter/consts.rs:13:33
|
13 | pub 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#non_std_lazy_statics
= note: `-W clippy::non-std-lazy-statics` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::non_std_lazy_statics)]`
help: use `std::sync::LazyLock` instead
|
13 ~ pub static KWARGS_QUERYSTRINGS: std::sync::LazyLock<RwLock<HashMap<String, (String, Vec<String>)>>> =
14 ~ std::sync::LazyLock::new(|| RwLock::new(Default::default()));
|
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 479 in src/value_converter/models/dto.rs
github-actions / clippy
unnecessary semicolon
warning: unnecessary semicolon
--> src/value_converter/models/dto.rs:479:22
|
479 | };
| ^ help: remove
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_semicolon
Check warning on line 708 in src/value_converter/funcs/to_python.rs
github-actions / clippy
unnecessary semicolon
warning: unnecessary semicolon
--> src/value_converter/funcs/to_python.rs:708:6
|
708 | };
| ^ help: remove
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_semicolon
Check warning on line 179 in src/value_converter/funcs/to_python.rs
github-actions / clippy
unnecessary semicolon
warning: unnecessary semicolon
--> src/value_converter/funcs/to_python.rs:179:22
|
179 | };
| ^ help: remove
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_semicolon
Check warning on line 922 in src/value_converter/funcs/from_python.rs
github-actions / clippy
unnecessary semicolon
warning: unnecessary semicolon
--> src/value_converter/funcs/from_python.rs:922:6
|
922 | };
| ^ help: remove
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_semicolon
Check warning on line 883 in src/value_converter/funcs/from_python.rs
github-actions / clippy
unnecessary semicolon
warning: unnecessary semicolon
--> src/value_converter/funcs/from_python.rs:883:10
|
883 | };
| ^ help: remove
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_semicolon
Check warning on line 874 in src/value_converter/funcs/from_python.rs
github-actions / clippy
unnecessary semicolon
warning: unnecessary semicolon
--> src/value_converter/funcs/from_python.rs:874:10
|
874 | };
| ^ help: remove
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_semicolon
Check warning on line 832 in src/value_converter/funcs/from_python.rs
github-actions / clippy
unnecessary semicolon
warning: unnecessary semicolon
--> src/value_converter/funcs/from_python.rs:832:10
|
832 | };
| ^ help: remove
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_semicolon
Check warning on line 766 in src/value_converter/funcs/from_python.rs
github-actions / clippy
unnecessary semicolon
warning: unnecessary semicolon
--> src/value_converter/funcs/from_python.rs:766:14
|
766 | };
| ^ help: remove
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_semicolon
Check warning on line 677 in src/value_converter/funcs/from_python.rs
github-actions / clippy
docs for function returning `Result` missing `# Errors` section
warning: docs for function returning `Result` missing `# Errors` section
--> src/value_converter/funcs/from_python.rs:675:1
|
675 | / pub fn convert_seq_parameters(
676 | | seq_params: Vec<Py<PyAny>>,
677 | | ) -> 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 666 in src/value_converter/funcs/from_python.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/funcs/from_python.rs:666:21
|
666 | 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 654 in src/value_converter/funcs/from_python.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'a
warning: the following explicit lifetimes could be elided: 'a
--> src/value_converter/funcs/from_python.rs:654:34
|
654 | pub fn convert_kwargs_parameters<'a>(
| ^^
655 | kw_params: &Bound<'_, PyMapping>,
656 | 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
|
654 ~ pub fn convert_kwargs_parameters(
655 | kw_params: &Bound<'_, PyMapping>,
656 ~ querystring: &str,
|
Check warning on line 657 in src/value_converter/funcs/from_python.rs
github-actions / clippy
docs for function returning `Result` missing `# Errors` section
warning: docs for function returning `Result` missing `# Errors` section
--> src/value_converter/funcs/from_python.rs:654:1
|
654 | / pub fn convert_kwargs_parameters<'a>(
655 | | kw_params: &Bound<'_, PyMapping>,
656 | | querystring: &'a str,
657 | | ) -> 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 25 in src/value_converter/consts.rs
github-actions / clippy
docs for function returning `Result` missing `# Errors` section
warning: docs for function returning `Result` missing `# Errors` section
--> src/value_converter/consts.rs:25:1
|
25 | pub fn get_timedelta_cls(py: Python<'_>) -> PyResult<&Bound<'_, PyType>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
Check warning on line 16 in src/value_converter/consts.rs
github-actions / clippy
docs for function returning `Result` missing `# Errors` section
warning: docs for function returning `Result` missing `# Errors` section
--> src/value_converter/consts.rs:16:1
|
16 | pub fn get_decimal_cls(py: Python<'_>) -> PyResult<&Bound<'_, PyType>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
Check warning on line 14 in src/value_converter/consts.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/consts.rs:14:30
|
14 | 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 13 in src/value_converter/consts.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/consts.rs:13:33
|
13 | pub 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 50 in src/driver/transaction.rs
github-actions / clippy
unnecessary semicolon
warning: unnecessary semicolon
--> src/driver/transaction.rs:50:10
|
50 | };
| ^ help: remove
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_semicolon
Check warning on line 25 in src/driver/listener/structs.rs
github-actions / clippy
unnecessary semicolon
warning: unnecessary semicolon
--> src/driver/listener/structs.rs:25:10
|
25 | };
| ^ help: remove
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_semicolon
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