Skip to content

Commit

Permalink
fix(tokenize): fix wrong lifetime of build_from_trie
Browse files Browse the repository at this point in the history
  • Loading branch information
ChieloNewctle committed Nov 6, 2023
1 parent a1bb23c commit b551398
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/tokenize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ impl<'s, TransTable: TransitionTable, TokenIDType: Clone + Default + PartialEq>
pub mod trie {
use crate::{GeneralSAM, TransitionTable, Trie, TrieNodeAlike, TrieNodeID, TrieState};

impl<'s, 't, TransTable: TransitionTable> super::GreedyTokenizer<'s, TransTable, TrieNodeID> {
pub fn build_from_trie<TT: TransitionTable<KeyType = TransTable::KeyType>>(
impl<'s, TransTable: TransitionTable> super::GreedyTokenizer<'s, TransTable, TrieNodeID> {
pub fn build_from_trie<'t, TT: TransitionTable<KeyType = TransTable::KeyType>>(
sam: &'s GeneralSAM<TransTable>,
trie_state: TrieState<'t, TT>,
) -> Self {
Expand Down

0 comments on commit b551398

Please sign in to comment.