Skip to content

Commit

Permalink
Clippy.
Browse files Browse the repository at this point in the history
  • Loading branch information
abizjak committed Oct 18, 2023
1 parent 0419476 commit cf298a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contract-testing/src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1986,7 +1986,7 @@ impl ContractInvokeError {
/// - could parse into `T`, but there were leftover bytes
pub fn parse_return_value<T: Deserial>(&self) -> ParseResult<T> {
use contracts_common::{Cursor, Get, ParseError};
let return_value = self.return_value().ok_or_else(|| ParseError::default())?;
let return_value = self.return_value().ok_or_else(ParseError::default)?;
let mut cursor = Cursor::new(return_value);
let res = cursor.get()?;
// Check that all bytes have been read, as leftover bytes usually indicate
Expand Down

0 comments on commit cf298a9

Please sign in to comment.