Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
rllola committed Feb 9, 2024
1 parent 9ffa0da commit 5e1c877
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/server/endpoints/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use axum::{
use serde::{Deserialize, Serialize};
use sqlx::Row as TRow;
use std::collections::HashMap;
use tendermint::Block;
use tracing::info;

use crate::{
Expand All @@ -16,7 +15,7 @@ use crate::{
#[derive(Debug, Serialize, Deserialize, PartialEq)]
#[serde(untagged)]
pub enum LatestBlock {
LastBlock(BlockInfo),
LastBlock(Box<BlockInfo>),
LatestBlocks(Vec<BlockInfo>),
}

Expand Down Expand Up @@ -110,6 +109,6 @@ pub async fn get_last_block(
let block_id: Vec<u8> = row.try_get("block_id")?;
get_tx_hashes(&state, &mut block, &block_id).await?;

Ok(Json(LatestBlock::LastBlock(block)))
Ok(Json(LatestBlock::LastBlock(Box::new(block))))
}
}

0 comments on commit 5e1c877

Please sign in to comment.