From d10aacb73d23712e0989b83b40905462da24a809 Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Tue, 6 Feb 2024 11:15:24 +0100 Subject: [PATCH] Clippy. --- tokenizers/src/tokenizer/normalizer.rs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/tokenizers/src/tokenizer/normalizer.rs b/tokenizers/src/tokenizer/normalizer.rs index d2adbcc60..8d5b66455 100644 --- a/tokenizers/src/tokenizer/normalizer.rs +++ b/tokenizers/src/tokenizer/normalizer.rs @@ -5,19 +5,6 @@ use unicode_normalization_alignments::UnicodeNormalization; use serde::{Deserialize, Serialize}; -/// Add or Substract a signed isize on a usize. Makes sure of avoiding -/// any substraction overflow, flooring at 0. -macro_rules! apply_signed { - ($origin: expr, $signed: expr) => { - if $signed.is_positive() { - $origin += $signed as usize; - } else { - let (result, overflow) = $origin.overflowing_sub(-($signed) as usize); - $origin = if overflow { 0 } else { result }; - } - }; -} - /// The possible offsets referential #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum OffsetReferential {