Skip to content

Commit b710b90

Browse files
authored
*: Fix warnings about fields never being read
1 parent 1967204 commit b710b90

File tree

10 files changed

+41
-27
lines changed

10 files changed

+41
-27
lines changed

chain/ethereum/src/trigger.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ impl std::fmt::Debug for MappingTrigger {
6060
#[derive(Debug)]
6161
enum MappingTriggerWithoutBlock {
6262
Log {
63-
transaction: Arc<Transaction>,
64-
log: Arc<Log>,
65-
params: Vec<LogParam>,
63+
_transaction: Arc<Transaction>,
64+
_log: Arc<Log>,
65+
_params: Vec<LogParam>,
6666
},
6767
Call {
68-
transaction: Arc<Transaction>,
69-
call: Arc<EthereumCall>,
70-
inputs: Vec<LogParam>,
71-
outputs: Vec<LogParam>,
68+
_transaction: Arc<Transaction>,
69+
_call: Arc<EthereumCall>,
70+
_inputs: Vec<LogParam>,
71+
_outputs: Vec<LogParam>,
7272
},
7373
Block,
7474
}
@@ -80,9 +80,9 @@ impl std::fmt::Debug for MappingTrigger {
8080
log,
8181
params,
8282
} => MappingTriggerWithoutBlock::Log {
83-
transaction: transaction.cheap_clone(),
84-
log: log.cheap_clone(),
85-
params: params.clone(),
83+
_transaction: transaction.cheap_clone(),
84+
_log: log.cheap_clone(),
85+
_params: params.clone(),
8686
},
8787
MappingTrigger::Call {
8888
block: _,
@@ -91,10 +91,10 @@ impl std::fmt::Debug for MappingTrigger {
9191
inputs,
9292
outputs,
9393
} => MappingTriggerWithoutBlock::Call {
94-
transaction: transaction.cheap_clone(),
95-
call: call.cheap_clone(),
96-
inputs: inputs.clone(),
97-
outputs: outputs.clone(),
94+
_transaction: transaction.cheap_clone(),
95+
_call: call.cheap_clone(),
96+
_inputs: inputs.clone(),
97+
_outputs: outputs.clone(),
9898
},
9999
MappingTrigger::Block { block: _ } => MappingTriggerWithoutBlock::Block,
100100
};

graph/src/firehose/endpoints.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub struct FirehoseEndpoint {
1818
pub uri: String,
1919
pub token: Option<String>,
2020
channel: Channel,
21-
logger: Logger,
21+
_logger: Logger,
2222
}
2323

2424
impl Display for FirehoseEndpoint {
@@ -61,7 +61,7 @@ impl FirehoseEndpoint {
6161
uri,
6262
channel,
6363
token,
64-
logger,
64+
_logger: logger,
6565
})
6666
}
6767

graphql/src/introspection/resolver.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ fn input_value(
297297

298298
#[derive(Clone)]
299299
pub struct IntrospectionResolver {
300-
logger: Logger,
300+
_logger: Logger,
301301
type_objects: TypeObjectsMap,
302302
directives: r::Value,
303303
}
@@ -313,7 +313,7 @@ impl IntrospectionResolver {
313313
let directives = schema_directive_objects(schema, &mut type_objects);
314314

315315
IntrospectionResolver {
316-
logger,
316+
_logger: logger,
317317
type_objects,
318318
directives,
319319
}

node/src/manager/commands/copy.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ type UtcDateTime = DateTime<Utc>;
2525
struct CopyState {
2626
src: i32,
2727
dst: i32,
28+
#[allow(dead_code)]
2829
target_block_hash: Vec<u8>,
2930
target_block_number: i32,
3031
started_at: UtcDateTime,
@@ -35,12 +36,15 @@ struct CopyState {
3536
#[derive(Queryable, QueryableByName, Debug)]
3637
#[table_name = "copy_table_state"]
3738
struct CopyTableState {
39+
#[allow(dead_code)]
3840
id: i32,
3941
entity_type: String,
42+
#[allow(dead_code)]
4043
dst: i32,
4144
next_vid: i64,
4245
target_vid: i64,
4346
batch_size: i64,
47+
#[allow(dead_code)]
4448
started_at: UtcDateTime,
4549
finished_at: Option<UtcDateTime>,
4650
duration_ms: i64,

server/websocket/src/connection.rs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,18 @@ struct StartPayload {
3535
#[derive(Debug, Deserialize)]
3636
#[serde(tag = "type", rename_all = "snake_case")]
3737
enum IncomingMessage {
38-
ConnectionInit { payload: Option<serde_json::Value> },
38+
ConnectionInit {
39+
#[allow(dead_code)]
40+
payload: Option<serde_json::Value>,
41+
},
3942
ConnectionTerminate,
40-
Start { id: String, payload: StartPayload },
41-
Stop { id: String },
43+
Start {
44+
id: String,
45+
payload: StartPayload,
46+
},
47+
Stop {
48+
id: String,
49+
},
4250
}
4351

4452
impl IncomingMessage {

store/postgres/src/catalog.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ pub fn supports_proof_of_indexing(
117117
#[derive(Debug, QueryableByName)]
118118
struct Table {
119119
#[sql_type = "Text"]
120+
#[allow(dead_code)]
120121
pub table_name: String,
121122
}
122123
let query =

store/postgres/src/primary.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ allow_tables_to_appear_in_same_query!(
193193
#[table_name = "deployment_schemas"]
194194
struct Schema {
195195
id: DeploymentId,
196+
#[allow(dead_code)]
196197
pub created_at: PgTimestamp,
197198
pub subgraph: String,
198199
pub name: String,

store/postgres/src/relational.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ impl Layout {
547547
tables.push(self.table_for_entity(entity_type)?.as_ref());
548548
}
549549
let query = FindManyQuery {
550-
namespace: &self.catalog.site.namespace,
550+
_namespace: &self.catalog.site.namespace,
551551
ids_for_type,
552552
tables,
553553
block,

store/postgres/src/relational_queries.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,7 +1210,7 @@ impl<'a, Conn> RunQueryDsl<Conn> for FindQuery<'a> {}
12101210

12111211
#[derive(Debug, Clone, Constructor)]
12121212
pub struct FindManyQuery<'a> {
1213-
pub(crate) namespace: &'a Namespace,
1213+
pub(crate) _namespace: &'a Namespace,
12141214
pub(crate) tables: Vec<&'a Table>,
12151215

12161216
// Maps object name to ids.
@@ -1407,7 +1407,7 @@ impl<'a, Conn> RunQueryDsl<Conn> for InsertQuery<'a> {}
14071407

14081408
#[derive(Debug, Clone)]
14091409
pub struct ConflictingEntityQuery<'a> {
1410-
layout: &'a Layout,
1410+
_layout: &'a Layout,
14111411
tables: Vec<&'a Table>,
14121412
entity_id: &'a str,
14131413
}
@@ -1422,7 +1422,7 @@ impl<'a> ConflictingEntityQuery<'a> {
14221422
.map(|entity| layout.table_for_entity(entity).map(|table| table.as_ref()))
14231423
.collect::<Result<Vec<_>, _>>()?;
14241424
Ok(ConflictingEntityQuery {
1425-
layout,
1425+
_layout: layout,
14261426
tables,
14271427
entity_id,
14281428
})

tests/tests/parallel_tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ impl IntegrationTestSetup {
6565
#[derive(Debug)]
6666
struct TestCommandResults {
6767
success: bool,
68-
exit_code: Option<i32>,
68+
_exit_code: Option<i32>,
6969
stdout: String,
7070
stderr: String,
7171
}
@@ -341,7 +341,7 @@ async fn run_test_command(test_setup: &IntegrationTestSetup) -> anyhow::Result<T
341341

342342
Ok(TestCommandResults {
343343
success: output.status.success(),
344-
exit_code: output.status.code(),
344+
_exit_code: output.status.code(),
345345
stdout: pretty_output(&output.stdout, &stdout_tag),
346346
stderr: pretty_output(&output.stderr, &stderr_tag),
347347
})

0 commit comments

Comments
 (0)