Skip to content

Commit c58b2eb

Browse files
committed
Fix cargo clippy warnings
1 parent 46221e1 commit c58b2eb

File tree

22 files changed

+44
-57
lines changed

22 files changed

+44
-57
lines changed

src/adapter/src/catalog/state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,7 @@ impl CatalogState {
994994
let (stmt, resolved_ids) = mz_sql::names::resolve(catalog, stmt)?;
995995
let plan = mz_sql::plan::plan(pcx, catalog, stmt, &Params::empty(), &resolved_ids)?;
996996

997-
return Ok((plan, resolved_ids));
997+
Ok((plan, resolved_ids))
998998
}
999999

10001000
/// Parses the given SQL string into a pair of [`CatalogItem`].

src/adapter/src/coord.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2612,7 +2612,7 @@ impl Coordinator {
26122612
/// table.
26132613
#[instrument]
26142614
fn bootstrap_audit_log_table<'a>(
2615-
&mut self,
2615+
&self,
26162616
table_id: CatalogItemId,
26172617
name: &'a QualifiedItemName,
26182618
table: &'a Table,

src/adapter/src/coord/catalog_implications.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ impl Coordinator {
156156
#[instrument(level = "debug")]
157157
async fn apply_catalog_implications_inner(
158158
&mut self,
159-
mut ctx: Option<&mut ExecuteContext>,
159+
ctx: Option<&mut ExecuteContext>,
160160
implications: Vec<(CatalogItemId, CatalogImplication)>,
161161
cluster_commands: Vec<(ClusterId, CatalogImplication)>,
162162
cluster_replica_commands: Vec<((ClusterId, ReplicaId), CatalogImplication)>,
@@ -203,7 +203,7 @@ impl Coordinator {
203203
match implication {
204204
CatalogImplication::Table(CatalogImplicationKind::Added(table)) => {
205205
self.handle_create_table(
206-
&mut ctx,
206+
&ctx,
207207
&mut table_collections_to_create,
208208
&mut storage_policies_to_initialize,
209209
&mut execution_timestamps_to_set,
@@ -900,8 +900,8 @@ impl Coordinator {
900900

901901
#[instrument(level = "debug")]
902902
async fn handle_create_table(
903-
&mut self,
904-
ctx: &mut Option<&mut ExecuteContext>,
903+
&self,
904+
ctx: &Option<&mut ExecuteContext>,
905905
storage_collections_to_create: &mut BTreeMap<GlobalId, CollectionDescription<Timestamp>>,
906906
storage_policies_to_initialize: &mut BTreeMap<CompactionWindow, BTreeSet<GlobalId>>,
907907
execution_timestamps_to_set: &mut BTreeSet<StatementLoggingId>,
@@ -1155,7 +1155,7 @@ impl Coordinator {
11551155

11561156
#[instrument(level = "debug")]
11571157
async fn handle_create_source(
1158-
&mut self,
1158+
&self,
11591159
storage_collections_to_create: &mut BTreeMap<GlobalId, CollectionDescription<Timestamp>>,
11601160
storage_policies_to_initialize: &mut BTreeMap<CompactionWindow, BTreeSet<GlobalId>>,
11611161
item_id: CatalogItemId,

src/adapter/src/coord/cluster_scheduling.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ impl SchedulingDecision {
109109
impl Coordinator {
110110
#[mz_ore::instrument(level = "debug")]
111111
/// Call each scheduling policy.
112-
pub(crate) async fn check_scheduling_policies(&mut self) {
112+
pub(crate) async fn check_scheduling_policies(&self) {
113113
// (So far, we have only this one policy.)
114114
self.check_refresh_policy();
115115
}

src/adapter/src/coord/command_handler.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ impl Coordinator {
444444

445445
#[mz_ore::instrument(level = "debug")]
446446
async fn handle_generate_sasl_challenge(
447-
&mut self,
447+
&self,
448448
tx: oneshot::Sender<Result<SASLChallengeResponse, AdapterError>>,
449449
role_name: String,
450450
client_nonce: String,
@@ -521,7 +521,7 @@ impl Coordinator {
521521

522522
#[mz_ore::instrument(level = "debug")]
523523
async fn handle_authenticate_password(
524-
&mut self,
524+
&self,
525525
tx: oneshot::Sender<Result<AuthResponse, AdapterError>>,
526526
role_name: String,
527527
password: Option<Password>,

src/adapter/src/coord/ddl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ impl Coordinator {
290290
/// called after this function successfully returns on any built
291291
/// [`DataflowDesc`](mz_compute_types::dataflows::DataflowDesc).
292292
#[instrument(name = "coord::catalog_transact_inner")]
293-
pub(crate) async fn catalog_transact_inner<'a>(
293+
pub(crate) async fn catalog_transact_inner(
294294
&mut self,
295295
conn_id: Option<&ConnectionId>,
296296
ops: Vec<catalog::Op>,

src/adapter/src/coord/message_handler.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ impl Coordinator {
207207
}
208208

209209
#[mz_ore::instrument(level = "debug")]
210-
pub async fn storage_usage_fetch(&mut self) {
210+
pub async fn storage_usage_fetch(&self) {
211211
let internal_cmd_tx = self.internal_cmd_tx.clone();
212212
let client = self.storage_usage_client.clone();
213213

src/adapter/src/coord/sequencer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ impl Coordinator {
542542
}
543543
Plan::AlterMaterializedViewApplyReplacement(plan) => {
544544
let result = self
545-
.sequence_alter_materialized_view_apply_replacement(&mut ctx, plan)
545+
.sequence_alter_materialized_view_apply_replacement(&ctx, plan)
546546
.await;
547547
ctx.retire(result);
548548
}

src/adapter/src/coord/sequencer/inner.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,7 @@ impl Coordinator {
838838
#[instrument]
839839
pub(super) async fn sequence_create_database(
840840
&mut self,
841-
session: &mut Session,
841+
session: &Session,
842842
plan: plan::CreateDatabasePlan,
843843
) -> Result<ExecuteResponse, AdapterError> {
844844
let ops = vec![catalog::Op::CreateDatabase {
@@ -861,7 +861,7 @@ impl Coordinator {
861861
#[instrument]
862862
pub(super) async fn sequence_create_schema(
863863
&mut self,
864-
session: &mut Session,
864+
session: &Session,
865865
plan: plan::CreateSchemaPlan,
866866
) -> Result<ExecuteResponse, AdapterError> {
867867
let op = catalog::Op::CreateSchema {
@@ -3644,7 +3644,7 @@ impl Coordinator {
36443644
#[instrument]
36453645
pub(crate) async fn sequence_alter_connection_stage_finish(
36463646
&mut self,
3647-
session: &mut Session,
3647+
session: &Session,
36483648
id: CatalogItemId,
36493649
connection: Connection,
36503650
) -> Result<ExecuteResponse, AdapterError> {
@@ -4251,7 +4251,7 @@ impl Coordinator {
42514251
// Returns the name of the portal to execute.
42524252
#[instrument]
42534253
pub(super) fn sequence_execute(
4254-
&mut self,
4254+
&self,
42554255
session: &mut Session,
42564256
plan: plan::ExecutePlan,
42574257
) -> Result<String, AdapterError> {
@@ -4703,7 +4703,7 @@ impl Coordinator {
47034703
#[instrument]
47044704
pub(super) async fn sequence_alter_materialized_view_apply_replacement(
47054705
&mut self,
4706-
ctx: &mut ExecuteContext,
4706+
ctx: &ExecuteContext,
47074707
plan: AlterMaterializedViewApplyReplacementPlan,
47084708
) -> Result<ExecuteResponse, AdapterError> {
47094709
let AlterMaterializedViewApplyReplacementPlan { id, replacement_id } = plan;

src/adapter/src/coord/sequencer/inner/cluster.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ impl Coordinator {
129129

130130
#[instrument]
131131
async fn alter_cluster_validate(
132-
&mut self,
132+
&self,
133133
session: &Session,
134134
plan: plan::AlterClusterPlan,
135135
) -> Result<ClusterStage, AdapterError> {

0 commit comments

Comments
 (0)