Skip to content

Commit 09bcbf3

Browse files
committed
all: Fix warnings from clippy::wrong_self_convention
1 parent 66f97fc commit 09bcbf3

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

graph/src/components/store/write.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ impl EntityModification {
207207
}
208208

209209
/// Turn an `Overwrite` into an `Insert`, return an error if this is a `Remove`
210-
fn as_insert(self, entity_type: &EntityType) -> Result<Self, StoreError> {
210+
fn into_insert(self, entity_type: &EntityType) -> Result<Self, StoreError> {
211211
use EntityModification::*;
212212

213213
match self {
@@ -510,7 +510,7 @@ impl RowGroup {
510510
Overwrite { block, .. },
511511
) => {
512512
prev_row.clamp(*block)?;
513-
let row = row.as_insert(&self.entity_type)?;
513+
let row = row.into_insert(&self.entity_type)?;
514514
self.push_row(row);
515515
}
516516
(Insert { end: None, .. } | Overwrite { end: None, .. }, Remove { block, .. }) => {

store/postgres/src/deployment.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,15 @@ impl OnSync {
110110
}
111111
}
112112

113-
pub fn to_str(&self) -> &str {
113+
pub fn to_str(&self) -> &'static str {
114114
match self {
115115
OnSync::None => "none",
116116
OnSync::Activate => "activate",
117117
OnSync::Replace => "replace",
118118
}
119119
}
120120

121-
fn to_sql(&self) -> Option<&str> {
121+
fn to_sql(self) -> Option<&'static str> {
122122
match self {
123123
OnSync::None => None,
124124
OnSync::Activate | OnSync::Replace => Some(self.to_str()),

store/postgres/src/detail.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ struct StoredSubgraphManifest {
546546
}
547547

548548
impl StoredSubgraphManifest {
549-
fn as_manifest(self, schema: &InputSchema) -> SubgraphManifestEntity {
549+
fn into_manifest_entity(self, schema: &InputSchema) -> SubgraphManifestEntity {
550550
let e: Vec<_> = self
551551
.entities_with_causality_region
552552
.into_iter()
@@ -568,7 +568,7 @@ impl StoredSubgraphManifest {
568568
struct StoredDeploymentEntity(crate::detail::DeploymentDetail, StoredSubgraphManifest);
569569

570570
impl StoredDeploymentEntity {
571-
fn as_subgraph_deployment(
571+
fn into_subgraph_deployment_entity(
572572
self,
573573
schema: &InputSchema,
574574
) -> Result<SubgraphDeploymentEntity, StoreError> {
@@ -611,7 +611,7 @@ impl StoredDeploymentEntity {
611611
.map_err(|b| internal_error!("invalid debug fork `{}`", b))?;
612612

613613
Ok(SubgraphDeploymentEntity {
614-
manifest: manifest.as_manifest(schema),
614+
manifest: manifest.into_manifest_entity(schema),
615615
failed: detail.failed,
616616
health: detail.health.into(),
617617
synced_at: detail.synced_at,
@@ -653,7 +653,7 @@ pub async fn deployment_entity(
653653
.await
654654
.map(DeploymentDetail::from)?;
655655

656-
StoredDeploymentEntity(detail, manifest).as_subgraph_deployment(schema)
656+
StoredDeploymentEntity(detail, manifest).into_subgraph_deployment_entity(schema)
657657
}
658658

659659
#[derive(Queryable, Identifiable, Insertable)]

0 commit comments

Comments
 (0)