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 14c7761 commit a1bb23c
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,10 +120,10 @@ impl<'s, TransTable: TransitionTable, TokenIDType: Clone + Default + PartialEq>
pub mod trie {
use crate::{GeneralSAM, TransitionTable, Trie, TrieNodeAlike, TrieNodeID, TrieState};

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

0 comments on commit a1bb23c

Please sign in to comment.