Skip to content

Commit

Permalink
clippy, you're so demanding
Browse files Browse the repository at this point in the history
  • Loading branch information
wlmyng committed Jun 28, 2024
1 parent 5197d3c commit a11abd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/sui-graphql-rpc/src/types/transaction_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ impl TransactionBlock {
// assumption that it will further constrain the rows we look up.
if let Some(txs) = &filter.transaction_ids {
let transaction_ids: Vec<TxLookup> = conn.results(move || select_ids(txs, &bound).into_boxed())?;
if transaction_ids.len() == 0 {
if transaction_ids.is_empty() {
return Ok::<_, diesel::result::Error>((false, false, vec![]));
}
bound = TxLookupBound::from_set(transaction_ids.into_iter().map(|tx| tx.tx_sequence_number as u64).collect());
Expand Down Expand Up @@ -573,7 +573,7 @@ impl TransactionBlockFilter {

pub(crate) fn is_consistent(&self) -> Result<(), Error> {
if let Some(before) = self.before_checkpoint {
if before <= 0 {
if before == 0 {
return Err(Error::Client(
"`beforeCheckpoint` must be greater than 0".to_string(),
));
Expand Down

0 comments on commit a11abd0

Please sign in to comment.