Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
wsxiaoys committed Apr 28, 2024
1 parent 924529e commit 7159d05
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/tabby-common/src/languages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ pub fn get_language(language: &str) -> &'static Language {
}
}

pub fn get_language_info_by_ext(ext: &OsStr) -> Option<&'static Language> {
pub fn get_language_by_ext(ext: &OsStr) -> Option<&'static Language> {
let ext = ext.to_str()?;
EXTS_LANGUAGE_MAPPING.get(ext).map(|x| get_language(x))
}
4 changes: 2 additions & 2 deletions crates/tabby-scheduler/src/dataset/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use kdam::BarExt;
use serde_jsonlines::WriteExt;
use tabby_common::{
config::RepositoryConfig,
languages::get_language_info_by_ext,
languages::get_language_by_ext,
path::{dataset_dir, dependency_file},
DependencyFile, SourceFile,
};
Expand Down Expand Up @@ -46,7 +46,7 @@ impl RepositoryExt for RepositoryConfig {
continue;

Check warning on line 46 in crates/tabby-scheduler/src/dataset/mod.rs

View check run for this annotation

Codecov / codecov/patch

crates/tabby-scheduler/src/dataset/mod.rs#L44-L46

Added lines #L44 - L46 were not covered by tests
};

let Some(language_info) = get_language_info_by_ext(ext) else {
let Some(language_info) = get_language_by_ext(ext) else {
debug!("Unknown language for {relative_path:?}");
continue;

Check warning on line 51 in crates/tabby-scheduler/src/dataset/mod.rs

View check run for this annotation

Codecov / codecov/patch

crates/tabby-scheduler/src/dataset/mod.rs#L49-L51

Added lines #L49 - L51 were not covered by tests
};
Expand Down

0 comments on commit 7159d05

Please sign in to comment.