Skip to content

Commit

Permalink
use div fn
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshix-1 committed May 26, 2024
1 parent 28f8002 commit d05ca23
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/language/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: EUPL-1.2
use std::num::NonZeroUsize;
use std::ops::Div;

#[cfg(feature = "pyo3")]
use pyo3::create_exception;
Expand Down Expand Up @@ -77,8 +78,8 @@ impl StringChunkIter {
}

#[must_use]
const fn __len__(&self) -> usize {
self.string.len() / self.padded_word_byte_count
fn __len__(&self) -> usize {
self.string.len().div(self.padded_word_byte_count)
}
}

Expand Down

0 comments on commit d05ca23

Please sign in to comment.