chore: Fix lint warnings (#205)

This commit is contained in:
Santiago Carmuega 2022-11-13 10:53:19 -03:00 committed by GitHub
parent f215f2178c
commit fb72e05b52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -65,7 +65,7 @@ impl<C: Channel> ChannelBuffer<C> {
M: Fragment,
{
let mut payload = Vec::new();
minicbor::encode(&msg, &mut payload)
minicbor::encode(msg, &mut payload)
.map_err(|err| ChannelError::Encoding(err.to_string()))?;
let chunks = payload.chunks(MAX_SEGMENT_PAYLOAD_LENGTH);

View file

@ -58,7 +58,7 @@ fn read_segment(reader: &mut impl Read) -> Result<Segment, std::io::Error> {
reader.read_exact(&mut header)?;
if log_enabled!(log::Level::Trace) {
trace!("read segment header: {:?}", hex::encode(&header));
trace!("read segment header: {:?}", hex::encode(header));
}
let length = NetworkEndian::read_u16(&header[6..]) as usize;

View file

@ -29,7 +29,7 @@ pub fn compute_linear_fee_policy(tx_size: u64, params: &PolicyParams) -> u64 {
}
pub fn compute_byron_fee(tx: &byron::MintedTxPayload, params: Option<&PolicyParams>) -> u64 {
let tx_size = to_vec(&tx).unwrap().len();
let tx_size = to_vec(tx).unwrap().len();
match params {
Some(params) => compute_linear_fee_policy(tx_size as u64, params),