From 9676ab19adc897be095d8495ea24e3eef2a2b331 Mon Sep 17 00:00:00 2001 From: Ben Brandt Date: Sun, 5 May 2024 15:34:37 -0700 Subject: [PATCH] Remove max_chunk_size_offset as public member --- src/chunk_size.rs | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/chunk_size.rs b/src/chunk_size.rs index e4f70c81..6b426f41 100644 --- a/src/chunk_size.rs +++ b/src/chunk_size.rs @@ -241,12 +241,6 @@ impl ChunkSize { self.fits } - /// max byte offset of the text that fit within the given `ChunkCapacity`. - #[must_use] - pub fn max_chunk_size_offset(&self) -> Option { - self.max_chunk_size_offset - } - /// Size of the chunk, in units used by the sizer. #[must_use] pub fn size(&self) -> usize { @@ -705,7 +699,7 @@ mod tests { assert_eq!( memoized_sizer .chunk_config - .sizer + .sizer() .calls .load(atomic::Ordering::SeqCst), 1 @@ -724,7 +718,7 @@ mod tests { assert_eq!( memoized_sizer .chunk_config - .sizer + .sizer() .calls .load(atomic::Ordering::SeqCst), 10 @@ -744,7 +738,7 @@ mod tests { assert_eq!( memoized_sizer .chunk_config - .sizer + .sizer() .calls .load(atomic::Ordering::SeqCst), 10 @@ -769,13 +763,13 @@ mod tests { let config = ChunkConfig::new(10); assert_eq!(config.capacity, 10.into()); assert_eq!(config.sizer, Characters); - assert!(config.trim); + assert!(config.trim()); } #[test] fn disable_trimming() { let config = ChunkConfig::new(10).with_trim(false); - assert!(!config.trim); + assert!(!config.trim()); } #[test] @@ -792,7 +786,7 @@ mod tests { let config = ChunkConfig::new(10).with_sizer(BasicSizer); assert_eq!(config.capacity, 10.into()); assert_eq!(config.sizer, BasicSizer); - assert!(config.trim); + assert!(config.trim()); } #[test]