Skip to content

Commit 96cc8de

Browse files
clippy
1 parent a8de370 commit 96cc8de

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

etl/src/replication/client.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ impl PgReplicationClient {
830830
}
831831

832832
let union_query = selects.join(" union all ");
833-
format!(r#"copy ({}) to stdout with (format text);"#, union_query)
833+
format!(r#"copy ({union_query}) to stdout with (format text);"#)
834834
} else {
835835
let table_name = self.get_table_name(table_id).await?;
836836
format!(
@@ -879,10 +879,7 @@ impl PgReplicationClient {
879879

880880
/// Returns true if the given table id refers to a partitioned table (relkind = 'p').
881881
async fn is_partitioned_table(&self, table_id: TableId) -> EtlResult<bool> {
882-
let query = format!(
883-
"select c.relkind from pg_class c where c.oid = {}",
884-
table_id
885-
);
882+
let query = format!("select c.relkind from pg_class c where c.oid = {table_id}");
886883

887884
for msg in self.client.simple_query(&query).await? {
888885
if let SimpleQueryMessage::Row(row) = msg {
@@ -905,7 +902,7 @@ impl PgReplicationClient {
905902
with recursive parts(relid) as (
906903
select i.inhrelid
907904
from pg_inherits i
908-
where i.inhparent = {parent}
905+
where i.inhparent = {parent_id}
909906
union all
910907
select i.inhrelid
911908
from pg_inherits i
@@ -915,8 +912,7 @@ impl PgReplicationClient {
915912
from parts p
916913
left join pg_inherits i on i.inhparent = p.relid
917914
where i.inhrelid is null
918-
"#,
919-
parent = parent_id
915+
"#
920916
);
921917

922918
let mut ids = Vec::new();

etl/tests/partitioned_table_test.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ async fn partitioned_table_copy_replicates_existing_data() {
7474

7575
assert_eq!(
7676
total_rows, 3,
77-
"Expected 3 rows synced (one per partition), but got {}",
78-
total_rows
77+
"Expected 3 rows synced (one per partition), but got {total_rows}"
7978
);
8079

8180
let table_states = state_store.get_table_replication_states().await;
@@ -182,8 +181,7 @@ async fn partitioned_table_copy_and_streams_new_data_from_new_partition() {
182181
let total_rows: usize = table_rows.values().map(|rows| rows.len()).sum();
183182
assert_eq!(
184183
total_rows, 2,
185-
"Expected 2 rows synced from initial copy, got {}",
186-
total_rows
184+
"Expected 2 rows synced from initial copy, got {total_rows}"
187185
);
188186

189187
let table_states = state_store.get_table_replication_states().await;

0 commit comments

Comments
 (0)