mirror of
https://github.com/sharkdp/hexyl.git
synced 2026-10-30 09:05:54 +00:00
BREAKING CHANGE: improvement(lib): use u64 for Printer::display_offset and Squeezer::process, not usize
Technically a breaking change for architectures where `size_of::<usize>() > size_of::<u64>()`, but that strikes me as extremely unlikely. This change is important because most file seek offsets, even on older architectures with word sizes smaller than `u32`, accept a `u64`. In particular, Rust's own `std` acknowledges this. So, we're actually going against prior art in Rust by using a `usize`.
This commit is contained in:
1 parent
c5c8d1190f
commit
6d5c61b671
3 files changed
+22
-20
No files matched your search
+1
-1
@@ -149,7 +149,7 @@ fn run() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let mut stdout_lock = stdout.lock();
|
||||
|
||||
let mut printer = Printer::new(&mut stdout_lock, show_color, border_style, squeeze);
|
||||
printer.display_offset(display_offset as usize);
|
||||
printer.display_offset(display_offset);
|
||||
printer.print_all(&mut reader)?;
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in new issue
Block a user