Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
bikeshedder committed Jan 25, 2025
1 parent 77642f5 commit 24673ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion postgres/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ impl Config {
if let Some(user) = self.user.as_ref().filter(|s| !s.is_empty()) {
cfg.user(user.as_str());
}
if !cfg.get_user().map_or(false, |u| !u.is_empty()) {
if !cfg.get_user().is_some_and(|u| !u.is_empty()) {
if let Ok(user) = env::var("USER") {
cfg.user(&user);
}
Expand Down
2 changes: 1 addition & 1 deletion postgres/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ pub struct Transaction<'a> {
pub statement_cache: Arc<StatementCache>,
}

impl<'a> Transaction<'a> {
impl Transaction<'_> {
/// Like [`tokio_postgres::Transaction::prepare()`], but uses an existing
/// [`Statement`] from the [`StatementCache`] if possible.
pub async fn prepare_cached(&self, query: &str) -> Result<Statement, Error> {
Expand Down

0 comments on commit 24673ad

Please sign in to comment.