Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
kobayurii committed Oct 7, 2024
1 parent 1c62995 commit 04d8772
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions rpc-server/src/modules/blocks/methods.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use actix_web::web::Data;
use near_primitives::block;
use near_primitives::trie_key::TrieKey;
use near_primitives::views::StateChangeValueView;

Expand Down Expand Up @@ -290,7 +289,7 @@ pub async fn fetch_block(
let block_height = match block_reference {
near_primitives::types::BlockReference::BlockId(block_id) => match block_id {
near_primitives::types::BlockId::Height(block_height) => {
check_block_height(data, block_height.clone()).await?;
check_block_height(data, *block_height).await?;
Ok(*block_height)
}
near_primitives::types::BlockId::Hash(block_hash) => {
Expand Down Expand Up @@ -392,7 +391,7 @@ pub async fn fetch_chunk(
let block_height =
match block_id {
near_primitives::types::BlockId::Height(block_height) => {
check_block_height(data, block_height.clone()).await.map_err(|err| {
check_block_height(data, block_height).await.map_err(|err| {
near_jsonrpc::primitives::types::chunks::RpcChunkError::UnknownBlock {
error_message: err.to_string(),
}
Expand Down
2 changes: 1 addition & 1 deletion rpc-server/src/modules/blocks/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ pub async fn fetch_block_from_cache_or_get(
near_primitives::types::BlockReference::BlockId(block_id) => {
let block_height = match block_id {
near_primitives::types::BlockId::Height(block_height) => {
check_block_height(data, block_height.clone()).await?;
check_block_height(data, *block_height).await?;
*block_height
}
near_primitives::types::BlockId::Hash(hash) => data
Expand Down

0 comments on commit 04d8772

Please sign in to comment.