mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-19 22:20:37 +00:00
clippy cleanup #2
- remove needless return - remove needless format! - remove a few more needless clone() - from_str_radix(_, 10) -> .parse() - remove needless reference - remove needless `mut` Also manually replaced a match statement with map_err() because after clippy was done with it, there was almost nothing left in the match expression.
This commit is contained in:
@@ -227,7 +227,7 @@ impl WalStreamDecoder {
|
||||
// FIXME: check that hdr.xlp_rem_len matches self.contlen
|
||||
//println!("next xlog page (xlp_rem_len: {})", hdr.xlp_rem_len);
|
||||
|
||||
return hdr;
|
||||
hdr
|
||||
}
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
@@ -239,7 +239,7 @@ impl WalStreamDecoder {
|
||||
xlp_xlog_blcksz: self.inputbuf.get_u32_le(),
|
||||
};
|
||||
|
||||
return hdr;
|
||||
hdr
|
||||
}
|
||||
}
|
||||
|
||||
@@ -350,7 +350,7 @@ fn is_xlog_switch_record(rec: &Bytes) -> bool {
|
||||
buf.advance(2); // 2 bytes of padding
|
||||
let _xl_crc = buf.get_u32_le();
|
||||
|
||||
return xl_info == pg_constants::XLOG_SWITCH && xl_rmid == pg_constants::RM_XLOG_ID;
|
||||
xl_info == pg_constants::XLOG_SWITCH && xl_rmid == pg_constants::RM_XLOG_ID
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
@@ -651,6 +651,6 @@ pub fn decode_wal_record(rec: Bytes) -> DecodedWALRecord {
|
||||
DecodedWALRecord {
|
||||
record: rec,
|
||||
blocks,
|
||||
main_data_offset: main_data_offset,
|
||||
main_data_offset,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user