Skip to content

Commit 256def2

Browse files
committed
Resolved add warnings
1 parent b10dabc commit 256def2

File tree

8 files changed

+13
-15
lines changed

8 files changed

+13
-15
lines changed

src/connection/traits.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ pub trait Transaction {
5757
if let Some(level) = isolation_level {
5858
let level = &level.to_str_level();
5959
querystring.push_str(format!(" ISOLATION LEVEL {level}").as_str());
60-
};
60+
}
6161

6262
querystring.push_str(match read_variant {
6363
Some(ReadVariant::ReadOnly) => " READ ONLY",

src/driver/connection_pool_builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl ConnectionPoolBuilder {
5252
mgr_config = ManagerConfig {
5353
recycling_method: RecyclingMethod::Fast,
5454
};
55-
};
55+
}
5656

5757
let mgr: Manager = build_manager(
5858
mgr_config,

src/driver/cursor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ impl Cursor {
176176
"Iteration is over, no more results in portal",
177177
)
178178
.into());
179-
};
179+
}
180180

181181
Ok(result)
182182
})

src/driver/listener/structs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ impl ChannelCallbacks {
2222
Entry::Occupied(mut e) => {
2323
e.get_mut().push(callback);
2424
}
25-
};
25+
}
2626
}
2727

2828
#[must_use]

src/statement/cache.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use std::collections::HashMap;
22

3-
use once_cell::sync::Lazy;
43
use postgres_types::Type;
54
use tokio::sync::RwLock;
65
use tokio_postgres::Statement;
@@ -54,5 +53,5 @@ impl StatementCacheInfo {
5453
}
5554
}
5655

57-
pub(crate) static STMTS_CACHE: Lazy<RwLock<StatementsCache>> =
58-
Lazy::new(|| RwLock::new(StatementsCache::default()));
56+
pub(crate) static STMTS_CACHE: std::sync::LazyLock<RwLock<StatementsCache>> =
57+
std::sync::LazyLock::new(|| RwLock::new(StatementsCache::default()));

src/value_converter/from_python.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,6 @@ pub fn py_sequence_into_flat_vec(
581581
final_vec.append(&mut next_vec);
582582
} else {
583583
final_vec.push(from_python_typed(&ok_seq_elem, type_)?);
584-
continue;
585584
}
586585
}
587586

@@ -627,7 +626,7 @@ fn convert_py_to_rust_coord_values(parameters: Vec<Py<PyAny>>) -> PSQLPyResult<V
627626
"Incorrect types of coordinate values. It must be int or float".into(),
628627
))
629628
}
630-
};
629+
}
631630
}
632631

633632
Ok::<Vec<f64>, RustPSQLDriverError>(coord_values_vec)
@@ -693,7 +692,7 @@ pub fn build_geo_coords(
693692
return Err(RustPSQLDriverError::PyToRustValueConversionError(
694693
"Inner coordinates must be passed as pairs of int/float in list/tuple/set or as flat structure with int/float values".into(),
695694
));
696-
};
695+
}
697696
Ok::<Vec<Coord>, RustPSQLDriverError>(result_vec)
698697
})?;
699698

@@ -735,7 +734,7 @@ pub fn build_flat_geo_coords(
735734
return Err(RustPSQLDriverError::PyToRustValueConversionError(format!(
736735
"Invalid number of values for this geo type, allowed {allowed_length}, got: {parameters_length}"
737736
)));
738-
};
737+
}
739738

740739
let result_vec = convert_py_to_rust_coord_values(parameters)?;
741740

@@ -744,7 +743,7 @@ pub fn build_flat_geo_coords(
744743
return Err(RustPSQLDriverError::PyToRustValueConversionError(format!(
745744
"Invalid number of values for this geo type, allowed {allowed_length}, got: {parameters_length}"
746745
)));
747-
};
746+
}
748747

749748
Ok::<Vec<f64>, RustPSQLDriverError>(result_vec)
750749
})
@@ -783,7 +782,7 @@ fn py_sequence_to_rust(bind_parameters: &Bound<PyAny>) -> PSQLPyResult<Vec<Py<Py
783782
return Err(RustPSQLDriverError::PyToRustValueConversionError(format!(
784783
"Invalid sequence type, please use list/tuple/set, {bind_parameters}"
785784
)));
786-
};
785+
}
787786

788787
Ok::<Vec<Py<PyAny>>, RustPSQLDriverError>(coord_values_sequence_vec)
789788
}

src/value_converter/models/serde_value.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ fn inner_pythondto_array_to_serde(
170170
_ => unreachable!(),
171171
}
172172
lower_bound += next_dimension.len as usize;
173-
};
173+
}
174174
}
175175

176176
return Ok(final_list);

src/value_converter/to_python.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ where
136136
);
137137
final_list.append(inner_pylist).unwrap();
138138
lower_bound += next_dimension.len as usize;
139-
};
139+
}
140140
}
141141

142142
return final_list.unbind();

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy