Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
chenkovsky committed Dec 28, 2024
1 parent ca17d0a commit e1da057
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rust/lance-index/src/scalar/inverted/tokenizer.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright The Lance Authors

use std::{env, path::{Path, PathBuf}};
use std::{env, path::PathBuf};

use lance_core::{Error, Result};
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -194,6 +194,7 @@ pub fn language_model_home() -> Option<PathBuf> {

#[cfg(feature = "tokenizer-common")]
trait TokenizerBuilder: Sized {

type Config: serde::de::DeserializeOwned + Default;
fn load(p: &PathBuf) -> Result<Self> {
if !p.is_dir() {
Expand All @@ -214,7 +215,7 @@ trait TokenizerBuilder: Sized {
Self::new(config, p)
}

fn new(config: Self::Config, root: &Path) -> Result<Self>;
fn new(config: Self::Config, root: &std::path::Path) -> Result<Self>;

fn build(&self) -> Result<tantivy::tokenizer::TextAnalyzerBuilder>;
}

0 comments on commit e1da057

Please sign in to comment.