Skip to content

Commit 4dceb7c

Browse files
committed
prefer allow(unused_variables) to let _
1 parent 62ab58d commit 4dceb7c

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

src/argument_markers.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ impl PydanticUndefinedType {
9393
UNDEFINED_CELL.get(py).unwrap().clone()
9494
}
9595

96-
fn __deepcopy__(&self, py: Python, memo: &PyAny) -> Py<Self> {
97-
let _ = memo;
96+
fn __deepcopy__(&self, py: Python, #[allow(unused_variables)] memo: &PyAny) -> Py<Self> {
9897
self.__copy__(py)
9998
}
10099

src/url.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,7 @@ impl PyUrl {
142142
true // an empty string is not a valid URL
143143
}
144144

145-
pub fn __deepcopy__(&self, py: Python, memo: &PyDict) -> Py<PyAny> {
146-
let _ = memo;
145+
pub fn __deepcopy__(&self, py: Python, #[allow(unused_variables)] memo: &PyDict) -> Py<PyAny> {
147146
self.clone().into_py(py)
148147
}
149148

src/validators/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ impl PySome {
8282
}
8383

8484
#[classmethod]
85-
pub fn __class_getitem__(cls: &PyType, item: &PyAny) -> Py<PyType> {
86-
let _ = item;
85+
pub fn __class_getitem__(cls: &PyType, #[allow(unused_variables)] item: &PyAny) -> Py<PyType> {
8786
cls.into_py(cls.py())
8887
}
8988

0 commit comments

Comments
 (0)