Skip to content

Commit 157c291

Browse files
committed
store: Remove unused ToSql/FromSql impls for AdaptiveBatchSize
1 parent 5f648ff commit 157c291

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

store/postgres/src/vid_batcher.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
use std::time::{Duration, Instant};
22

33
use diesel::{
4-
deserialize::FromSql,
5-
pg::Pg,
6-
serialize::{Output, ToSql},
74
sql_query,
85
sql_types::{BigInt, Integer},
96
PgConnection, RunQueryDsl as _,
@@ -62,22 +59,6 @@ impl AdaptiveBatchSize {
6259
}
6360
}
6461

65-
impl ToSql<BigInt, Pg> for AdaptiveBatchSize {
66-
fn to_sql<'b>(&'b self, out: &mut Output<'b, '_, Pg>) -> diesel::serialize::Result {
67-
<i64 as ToSql<BigInt, Pg>>::to_sql(&self.size, out)
68-
}
69-
}
70-
71-
impl FromSql<BigInt, Pg> for AdaptiveBatchSize {
72-
fn from_sql(bytes: diesel::pg::PgValue) -> diesel::deserialize::Result<Self> {
73-
let size = <i64 as FromSql<BigInt, Pg>>::from_sql(bytes)?;
74-
Ok(AdaptiveBatchSize {
75-
size,
76-
target: ENV_VARS.store.batch_target_duration,
77-
})
78-
}
79-
}
80-
8162
/// A timer that works like `std::time::Instant` in non-test code, but
8263
/// returns a fake elapsed value in tests
8364
struct Timer {

0 commit comments

Comments
 (0)