Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: Lior Sventitzky <[email protected]>
  • Loading branch information
liorsve committed Mar 5, 2025
1 parent b4f8420 commit 225ff28
Show file tree
Hide file tree
Showing 4 changed files with 269 additions and 175 deletions.
9 changes: 5 additions & 4 deletions glide-core/redis-rs/redis/src/cluster_async/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ where
pub async fn get_username(&mut self) -> RedisResult<Value> {
self.route_operation_request(Operation::GetUsername).await
}

/// Routes an operation request to the appropriate handler.
async fn route_operation_request(
&mut self,
Expand Down Expand Up @@ -625,7 +625,7 @@ enum CmdArg<C> {
#[derive(Clone)]
enum Operation {
UpdateConnectionPassword(Option<String>),
GetUsername
GetUsername,
}

fn route_for_pipeline(pipeline: &crate::Pipeline) -> RedisResult<Option<Route>> {
Expand Down Expand Up @@ -2283,11 +2283,12 @@ where
Ok(Response::Single(Value::Okay))
}
Operation::GetUsername => {
let username = core.get_cluster_param(|params| params.username.clone())
let username = core
.get_cluster_param(|params| params.username.clone())
.expect(MUTEX_WRITE_ERR);
Ok(Response::Single(match username {
Some(u) => Value::SimpleString(u),
None => Value::Nil
None => Value::Nil,
}))
}
},
Expand Down
Loading

0 comments on commit 225ff28

Please sign in to comment.