Skip to content

Commit cfffb77

Browse files
committed
fix(clippy): replace map_or_else with unwrap_or_else for identity closure
The identity closure |t| t in map_or_else is unnecessary. Using unwrap_or_else is more idiomatic when the Some value doesn't need transformation.
1 parent e940260 commit cfffb77

File tree

1 file changed

+1
-1
lines changed
  • packages/cipherstash-proxy/src/postgresql/messages

1 file changed

+1
-1
lines changed

packages/cipherstash-proxy/src/postgresql/messages/bind.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ fn get_param_type(idx: usize, param_types: &[i32], col: &Column) -> Type {
104104
param_types
105105
.get(idx)
106106
.and_then(|oid| Type::from_oid(*oid as u32))
107-
.map_or_else(|| col.postgres_type.clone(), |t| t)
107+
.unwrap_or_else(|| col.postgres_type.clone())
108108
}
109109

110110
impl BindParam {

0 commit comments

Comments
 (0)