Skip to content

Commit efaee56

Browse files
asaf-swclaude
andauthored
apollo_rpc: delete dead code (#14096)
Remove two unused error constants that have been annotated with #[allow(dead_code)] since they were added and were never given callers: - FAILED_TO_RECEIVE_TRANSACTION (code 1) - INVALID_BLOCK_HASH (code 26) Co-authored-by: Claude <noreply@anthropic.com>
1 parent 125f084 commit efaee56

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

crates/apollo_rpc/src/v0_8/error.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,12 @@ pub struct JsonRpcError<T: Serialize> {
88
pub data: Option<T>,
99
}
1010

11-
// TODO(yair): Remove allow(dead_code) once all errors are used.
12-
#[allow(dead_code)]
13-
pub const FAILED_TO_RECEIVE_TRANSACTION: JsonRpcError<String> =
14-
JsonRpcError { code: 1, message: "Failed to write transaction", data: None };
15-
1611
pub const CONTRACT_NOT_FOUND: JsonRpcError<String> =
1712
JsonRpcError { code: 20, message: "Contract not found", data: None };
1813

1914
pub const INVALID_TRANSACTION_HASH: JsonRpcError<String> =
2015
JsonRpcError { code: 25, message: "Invalid transaction hash", data: None };
2116

22-
// TODO(shahak): Remove allow(dead_code) once all errors are used.
23-
#[allow(dead_code)]
24-
pub const INVALID_BLOCK_HASH: JsonRpcError<String> =
25-
JsonRpcError { code: 26, message: "Invalid block hash", data: None };
26-
2717
pub const BLOCK_NOT_FOUND: JsonRpcError<String> =
2818
JsonRpcError { code: 24, message: "Block not found", data: None };
2919

0 commit comments

Comments
 (0)