Skip to content

Commit e63ba79

Browse files
committed
fix: fix clippy errors and downgrade home crate for Rust 1.85 compatibility
- Replace redundant closures with direct variant constructors - Downgrade home crate from 0.5.12 to 0.5.9 for Rust 1.85 compat
1 parent 2591932 commit e63ba79

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

Cargo.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/storage/postgres.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ impl PostgresStorage {
1818
.max_connections(20)
1919
.connect(database_url)
2020
.await
21-
.map_err(|e| ExecutorError::Database(e))?;
21+
.map_err(ExecutorError::Database)?;
2222

2323
Ok(Self { pool })
2424
}
@@ -55,7 +55,7 @@ impl PostgresStorage {
5555
)
5656
.execute(&self.pool)
5757
.await
58-
.map_err(|e| ExecutorError::Database(e))?;
58+
.map_err(ExecutorError::Database)?;
5959

6060
sqlx::query(
6161
r#"
@@ -64,7 +64,7 @@ impl PostgresStorage {
6464
)
6565
.execute(&self.pool)
6666
.await
67-
.map_err(|e| ExecutorError::Database(e))?;
67+
.map_err(ExecutorError::Database)?;
6868

6969
sqlx::query(
7070
r#"
@@ -73,7 +73,7 @@ impl PostgresStorage {
7373
)
7474
.execute(&self.pool)
7575
.await
76-
.map_err(|e| ExecutorError::Database(e))?;
76+
.map_err(ExecutorError::Database)?;
7777

7878
sqlx::query(
7979
r#"
@@ -82,7 +82,7 @@ impl PostgresStorage {
8282
)
8383
.execute(&self.pool)
8484
.await
85-
.map_err(|e| ExecutorError::Database(e))?;
85+
.map_err(ExecutorError::Database)?;
8686

8787
// Verified instances table
8888
sqlx::query(
@@ -101,7 +101,7 @@ impl PostgresStorage {
101101
)
102102
.execute(&self.pool)
103103
.await
104-
.map_err(|e| ExecutorError::Database(e))?;
104+
.map_err(ExecutorError::Database)?;
105105

106106
info!("Migrations complete");
107107
Ok(())
@@ -158,7 +158,7 @@ impl PostgresStorage {
158158
.bind(&result.error)
159159
.execute(&self.pool)
160160
.await
161-
.map_err(|e| ExecutorError::Database(e))?;
161+
.map_err(ExecutorError::Database)?;
162162

163163
Ok(())
164164
}
@@ -176,7 +176,7 @@ impl PostgresStorage {
176176
.bind(execution_id)
177177
.fetch_optional(&self.pool)
178178
.await
179-
.map_err(|e| ExecutorError::Database(e))?;
179+
.map_err(ExecutorError::Database)?;
180180

181181
Ok(row)
182182
}
@@ -211,7 +211,7 @@ impl PostgresStorage {
211211
.bind(errors_json)
212212
.execute(&self.pool)
213213
.await
214-
.map_err(|e| ExecutorError::Database(e))?;
214+
.map_err(ExecutorError::Database)?;
215215

216216
Ok(())
217217
}

0 commit comments

Comments
 (0)