Skip to content

Commit 9e6c927

Browse files
committed
Fix lints
1 parent b2d3729 commit 9e6c927

File tree

7 files changed

+11
-15
lines changed

7 files changed

+11
-15
lines changed

.antithesis/client/rust-load-generator/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ async fn query(addr: String, tripwire: Tripwire) -> eyre::Result<()> {
198198
.query_typed::<TeamStats>(
199199
&Statement::WithParams(
200200
TEAM_QUERY.into(),
201-
vec![format!("%{}%", letter).into()],
201+
vec![format!("%{letter}%").into()],
202202
),
203203
None,
204204
)

crates/corro-agent/src/agent/handlers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ mod tests {
10241024
db_conn.execute_batch("PRAGMA auto_vacuum = INCREMENTAL")?;
10251025
}
10261026

1027-
println!("temp db: {:?}", db_path);
1027+
println!("temp db: {db_path:?}");
10281028
let write_sema = Arc::new(Semaphore::new(1));
10291029
let pool = SplitPool::create(db_path, write_sema.clone()).await?;
10301030

crates/corro-client/src/lib.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ impl CorrosionApiClient {
5353
statement: &Statement,
5454
timeout: Option<u64>,
5555
) -> Result<QueryStream<T>, Error> {
56-
let params = timeout
57-
.map(|t| format!("?timeout={}", t))
58-
.unwrap_or_default();
56+
let params = timeout.map(|t| format!("?timeout={t}")).unwrap_or_default();
5957
let req = hyper::Request::builder()
6058
.method(hyper::Method::POST)
6159
.uri(format!("http://{}/v1/queries{}", self.api_addr, params))
@@ -115,7 +113,7 @@ impl CorrosionApiClient {
115113
)
116114
.try_into()?
117115
} else {
118-
format!("/v1/subscriptions?skip_rows={}", skip_rows).try_into()?
116+
format!("/v1/subscriptions?skip_rows={skip_rows}").try_into()?
119117
};
120118
let url = hyper::Uri::builder()
121119
.scheme("http")
@@ -179,7 +177,7 @@ impl CorrosionApiClient {
179177
)
180178
.try_into()?
181179
} else {
182-
format!("/v1/subscriptions/{id}?skip_rows={}", skip_rows).try_into()?
180+
format!("/v1/subscriptions/{id}?skip_rows={skip_rows}").try_into()?
183181
};
184182
let url = hyper::Uri::builder()
185183
.scheme("http")
@@ -227,7 +225,7 @@ impl CorrosionApiClient {
227225
&self,
228226
table: &str,
229227
) -> Result<UpdatesStream<T>, Error> {
230-
let p_and_q: PathAndQuery = format!("/v1/updates/{}", table).try_into()?;
228+
let p_and_q: PathAndQuery = format!("/v1/updates/{table}").try_into()?;
231229

232230
let url = hyper::Uri::builder()
233231
.scheme("http")

crates/corro-devcluster/src/main.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ fn main() {
104104
}
105105

106106
fn run_simple_topology(topo: Simple, bin_path: String, state_dir: PathBuf, schema_dir: PathBuf) {
107-
println!("//// Creating topology: \n{:#?}", topo);
107+
println!("//// Creating topology: \n{topo:#?}");
108108
let nodes = topo.get_all_nodes();
109109

110110
let mut port_map = BTreeMap::default();
@@ -140,10 +140,7 @@ fn run_simple_topology(topo: Simple, bin_path: String, state_dir: PathBuf, schem
140140
bootstrap_set,
141141
);
142142

143-
println!(
144-
"Generated config for node '{}': \n{}",
145-
node_name, node_config
146-
);
143+
println!("Generated config for node '{node_name}': \n{node_config}",);
147144

148145
let mut config_file = File::create(node_state.join("config.toml"))
149146
.expect("failed to create node config file");

crates/corro-types/src/pubsub.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2845,7 +2845,7 @@ mod tests {
28452845
let mut rx = created.evt_rx;
28462846

28472847
let matcher_id = matcher.id().as_simple().to_string();
2848-
println!("matcher restored w/ id: {}", matcher_id);
2848+
println!("matcher restored w/ id: {matcher_id}");
28492849

28502850
let (catch_up_tx, mut catch_up_rx) = mpsc::channel(1);
28512851

crates/corro-types/src/schema.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ pub fn apply_schema(
500500
}
501501
.into());
502502
}
503-
tx.execute_batch(&format!("ALTER TABLE {name} ADD COLUMN {}", col))?;
503+
tx.execute_batch(&format!("ALTER TABLE {name} ADD COLUMN {col}"))?;
504504
}
505505

506506
if require_migration {

rust-toolchain.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
[toolchain]
22
channel = "1.88"
3+
components = ["rustfmt", "clippy"]

0 commit comments

Comments
 (0)