Skip to content

Commit 6c5e51c

Browse files
authored
fix(formatting): Fix the formatting with clippy on Rust 1.88 (#349)
1 parent 787a5b2 commit 6c5e51c

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed

etl-destinations/tests/support/bigquery.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ impl BigQueryDatabase {
160160

161161
let column_definitions: Vec<String> = columns
162162
.iter()
163-
.map(|(name, data_type)| format!("{} {}", name, data_type))
163+
.map(|(name, data_type)| format!("{name} {data_type}"))
164164
.collect();
165165

166166
let ddl = format!(

etl-postgres/src/tokio/test_utils.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,39 +87,36 @@ impl<G: GenericClient> PgDatabase<G> {
8787
// PostgreSQL 15+ supports FOR ALL TABLES IN SCHEMA syntax
8888
let create_publication_query = match schema {
8989
Some(schema_name) => format!(
90-
"create publication {} for tables in schema {}",
91-
publication_name, schema_name
90+
"create publication {publication_name} for tables in schema {schema_name}"
9291
),
93-
None => format!("create publication {} for all tables", publication_name),
92+
None => format!("create publication {publication_name} for all tables"),
9493
};
9594

9695
client.execute(&create_publication_query, &[]).await?;
9796
} else {
9897
// PostgreSQL 14 and earlier: create publication and add tables individually
9998
match schema {
10099
Some(schema_name) => {
101-
let create_pub_query = format!("create publication {}", publication_name);
100+
let create_pub_query = format!("create publication {publication_name}");
102101
client.execute(&create_pub_query, &[]).await?;
103102

104103
let tables_query = format!(
105-
"select schemaname, tablename from pg_tables where schemaname = '{}'",
106-
schema_name
104+
"select schemaname, tablename from pg_tables where schemaname = '{schema_name}'"
107105
);
108106
let rows = client.query(&tables_query, &[]).await?;
109107

110108
for row in rows {
111109
let schema: String = row.get(0);
112110
let table: String = row.get(1);
113111
let add_table_query = format!(
114-
"alter publication {} add table {}.{}",
115-
publication_name, schema, table
112+
"alter publication {publication_name} add table {schema}.{table}"
116113
);
117114
client.execute(&add_table_query, &[]).await?;
118115
}
119116
}
120117
None => {
121118
let create_publication_query =
122-
format!("create publication {} for all tables", publication_name);
119+
format!("create publication {publication_name} for all tables");
123120
client.execute(&create_publication_query, &[]).await?;
124121
}
125122
}

etl/src/conversions/numeric.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1042,7 +1042,7 @@ mod tests {
10421042
let mut buf = BytesMut::new();
10431043
ToSql::to_sql(&case, &Type::NUMERIC, &mut buf).unwrap();
10441044
let round = PgNumeric::from_sql(&Type::NUMERIC, &buf).unwrap();
1045-
assert_eq!(format!("{}", case), format!("{}", round));
1045+
assert_eq!(format!("{case}"), format!("{}", round));
10461046
assert_eq!(case, round);
10471047
}
10481048
}

etl/src/conversions/table_row.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ mod tests {
334334

335335
for i in 0..50 {
336336
schema.push(ColumnSchema::new(
337-
format!("col{}", i),
337+
format!("col{i}"),
338338
Type::INT4,
339339
-1,
340340
false,

0 commit comments

Comments
 (0)