From b18da0ffe3530bf78344d27b5893820dac385327 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Tue, 12 Nov 2024 14:17:04 +0100 Subject: [PATCH] Make a couple of functions safe to call --- bzlib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bzlib.rs b/bzlib.rs index c63bc9ca1..32589df22 100644 --- a/bzlib.rs +++ b/bzlib.rs @@ -653,7 +653,7 @@ macro_rules! BZ_UPDATE_CRC { }; } -unsafe fn add_pair_to_block(s: &mut EState) { +fn add_pair_to_block(s: &mut EState) { let ch: u8 = s.state_in_ch as u8; for _ in 0..s.state_in_len { @@ -687,7 +687,7 @@ unsafe fn add_pair_to_block(s: &mut EState) { }; } -unsafe fn flush_rl(s: &mut EState) { +fn flush_rl(s: &mut EState) { if s.state_in_ch < 256 { add_pair_to_block(s); }