LISTEN/NOTIFY functionality #237
clippy
99 errors
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 99 |
Warning | 0 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.84.0 (9fc6b4312 2025-01-07)
- cargo 1.84.0 (66221abde 2024-11-19)
- clippy 0.1.84 (9fc6b43126 2025-01-07)
Annotations
Check failure on line 228 in src/driver/listener.rs
github-actions / clippy
unused `async` for function with no await statements
error: unused `async` for function with no await statements
--> src/driver/listener.rs:183:5
|
183 | / async fn listen(&mut self) -> RustPSQLDriverPyResult<()> {
184 | | let Some(client) = self.client.clone() else {
185 | | return Err(RustPSQLDriverError::BaseConnectionError("test".into()));
186 | | };
... |
227 | | Ok(())
228 | | }
| |_____^
|
= help: consider removing the `async` from this function
note: `await` used in an async block, which does not require the enclosing function to be `async`
--> src/driver/listener.rs:197:18
|
197 | .await
| ^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_async
Check failure on line 83 in src/driver/listener.rs
github-actions / clippy
unused `async` for function with no await statements
error: unused `async` for function with no await statements
--> src/driver/listener.rs:76:5
|
76 | / async fn __aexit__<'a>(
77 | | slf: Py<Self>,
78 | | _exception_type: Py<PyAny>,
79 | | exception: Py<PyAny>,
... |
82 | | Ok(())
83 | | }
| |_____^
|
= 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
Check failure on line 74 in src/driver/listener.rs
github-actions / clippy
unused `async` for function with no await statements
error: unused `async` for function with no await statements
--> src/driver/listener.rs:72:5
|
72 | / async fn __aenter__<'a>(slf: Py<Self>) -> RustPSQLDriverPyResult<Py<Self>> {
73 | | Ok(slf)
74 | | }
| |_____^
|
= 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
Check failure on line 570 in src/driver/connection_pool.rs
github-actions / clippy
unused `async` for function with no await statements
error: unused `async` for function with no await statements
--> src/driver/connection_pool.rs:504:5
|
504 | / pub async fn add_listener(
505 | | self_: pyo3::Py<Self>,
506 | | callback: Py<PyAny>,
507 | | ) -> RustPSQLDriverPyResult<Listener> {
... |
569 | | Ok(Listener::new(pg_config, ca_file, ssl_mode))
570 | | }
| |_____^
|
= 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: `-D clippy::unused-async` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::unused_async)]`
Check failure on line 205 in src/driver/utils.rs
github-actions / clippy
unneeded late initialization
error: unneeded late initialization
--> src/driver/utils.rs:205:5
|
205 | let mgr: Manager;
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init
= note: `-D clippy::needless-late-init` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::needless_late_init)]`
help: move the declaration `mgr` here and remove the assignments from the `match` arms
|
205 ~
206 ~ let mgr: Manager = match configured_tls {
207 | ConfiguredTLS::NoTls => {
208 ~ Manager::from_config(pg_config, NoTls, mgr_config)
209 | }
210 | ConfiguredTLS::TlsConnector(connector) => {
211 ~ Manager::from_config(pg_config, connector, mgr_config)
212 | }
213 ~ };
|
Check failure on line 180 in src/driver/utils.rs
github-actions / clippy
docs for function returning `Result` missing `# Errors` section
error: docs for function returning `Result` missing `# Errors` section
--> src/driver/utils.rs:177:1
|
177 | / pub fn build_tls(
178 | | ca_file: &Option<String>,
179 | | ssl_mode: Option<SslMode>,
180 | | ) -> RustPSQLDriverPyResult<ConfiguredTLS> {
| |__________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
Check failure on line 796 in src/driver/transaction.rs
github-actions / clippy
this lifetime isn't used in the function definition
error: this lifetime isn't used in the function definition
--> src/driver/transaction.rs:796:27
|
796 | pub async fn pipeline<'py>(
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
Check failure on line 227 in src/driver/transaction.rs
github-actions / clippy
this lifetime isn't used in the function definition
error: this lifetime isn't used in the function definition
--> src/driver/transaction.rs:227:24
|
227 | async fn __aexit__<'a>(
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
Check failure on line 172 in src/driver/transaction.rs
github-actions / clippy
this lifetime isn't used in the function definition
error: this lifetime isn't used in the function definition
--> src/driver/transaction.rs:172:25
|
172 | 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 failure on line 181 in src/driver/listener.rs
github-actions / clippy
this function's return value is unnecessary
error: this function's return value is unnecessary
--> src/driver/listener.rs:170:5
|
170 | / fn add_callback(&mut self, channel: String, callback: Py<PyAny>) -> RustPSQLDriverPyResult<()> {
171 | | match self.channel_callbacks.entry(channel) {
172 | | Entry::Vacant(e) => {
173 | | e.insert(vec![callback]);
... |
180 | | Ok(())
181 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
= note: `-D clippy::unnecessary-wraps` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::unnecessary_wraps)]`
help: remove the return type...
|
170 | fn add_callback(&mut self, channel: String, callback: Py<PyAny>) -> () {
| ~~
help: ...and then remove returned values
|
180 - Ok(())
|
Check failure on line 76 in src/driver/listener.rs
github-actions / clippy
this lifetime isn't used in the function definition
error: this lifetime isn't used in the function definition
--> src/driver/listener.rs:76:24
|
76 | async fn __aexit__<'a>(
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
Check failure on line 72 in src/driver/listener.rs
github-actions / clippy
this lifetime isn't used in the function definition
error: this lifetime isn't used in the function definition
--> src/driver/listener.rs:72:25
|
72 | 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 failure on line 55 in src/driver/listener.rs
github-actions / clippy
calling `Option::default()` is more clear than this expression
error: calling `Option::default()` is more clear than this expression
--> src/driver/listener.rs:55:23
|
55 | receiver: Default::default(),
| ^^^^^^^^^^^^^^^^^^ help: try: `Option::default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_trait_access
Check failure on line 54 in src/driver/listener.rs
github-actions / clippy
calling `Option::default()` is more clear than this expression
error: calling `Option::default()` is more clear than this expression
--> src/driver/listener.rs:54:21
|
54 | client: Default::default(),
| ^^^^^^^^^^^^^^^^^^ help: try: `Option::default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_trait_access
Check failure on line 53 in src/driver/listener.rs
github-actions / clippy
calling `Option::default()` is more clear than this expression
error: calling `Option::default()` is more clear than this expression
--> src/driver/listener.rs:53:35
|
53 | listen_abort_handler: Default::default(),
| ^^^^^^^^^^^^^^^^^^ help: try: `Option::default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_trait_access
Check failure on line 52 in src/driver/listener.rs
github-actions / clippy
calling `HashMap::default()` is more clear than this expression
error: calling `HashMap::default()` is more clear than this expression
--> src/driver/listener.rs:52:32
|
52 | channel_callbacks: 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: `-D clippy::default-trait-access` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::default_trait_access)]`
Check failure on line 587 in src/driver/cursor.rs
github-actions / clippy
this lifetime isn't used in the function definition
error: this lifetime isn't used in the function definition
--> src/driver/cursor.rs:587:37
|
587 | 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
Check failure on line 553 in src/driver/cursor.rs
github-actions / clippy
this lifetime isn't used in the function definition
error: this lifetime isn't used in the function definition
--> src/driver/cursor.rs:553:33
|
553 | pub async fn fetch_backward<'a>(
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
Check failure on line 520 in src/driver/cursor.rs
github-actions / clippy
this lifetime isn't used in the function definition
error: this lifetime isn't used in the function definition
--> src/driver/cursor.rs:520:36
|
520 | pub async fn fetch_forward_all<'a>(
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
Check failure on line 486 in src/driver/cursor.rs
github-actions / clippy
this lifetime isn't used in the function definition
error: this lifetime isn't used in the function definition
--> src/driver/cursor.rs:486:33
|
486 | pub async fn fetch_relative<'a>(
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
Check failure on line 452 in src/driver/cursor.rs
github-actions / clippy
this lifetime isn't used in the function definition
error: this lifetime isn't used in the function definition
--> src/driver/cursor.rs:452:33
|
452 | pub async fn fetch_absolute<'a>(
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
Check failure on line 425 in src/driver/cursor.rs
github-actions / clippy
this lifetime isn't used in the function definition
error: this lifetime isn't used in the function definition
--> src/driver/cursor.rs:425:29
|
425 | pub async fn fetch_last<'a>(slf: Py<Self>) -> RustPSQLDriverPyResult<PSQLDriverPyQueryResult> {
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
Check failure on line 398 in src/driver/cursor.rs
github-actions / clippy
this lifetime isn't used in the function definition
error: this lifetime isn't used in the function definition
--> src/driver/cursor.rs:398:30
|
398 | pub async fn fetch_first<'a>(slf: Py<Self>) -> RustPSQLDriverPyResult<PSQLDriverPyQueryResult> {
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
Check failure on line 371 in src/driver/cursor.rs
github-actions / clippy
this lifetime isn't used in the function definition
error: this lifetime isn't used in the function definition
--> src/driver/cursor.rs:371:30
|
371 | pub async fn fetch_prior<'a>(slf: Py<Self>) -> RustPSQLDriverPyResult<PSQLDriverPyQueryResult> {
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
Check failure on line 344 in src/driver/cursor.rs
github-actions / clippy
this lifetime isn't used in the function definition
error: this lifetime isn't used in the function definition
--> src/driver/cursor.rs:344:29
|
344 | pub async fn fetch_next<'a>(slf: Py<Self>) -> RustPSQLDriverPyResult<PSQLDriverPyQueryResult> {
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes