From 4668a49db374b0e9a45e6f59272ae8bd812c5675 Mon Sep 17 00:00:00 2001 From: Aleksey Yakovlev Date: Fri, 7 Jun 2024 14:55:09 +0700 Subject: [PATCH] remove unused code --- src/compiler/mod.rs | 1 - src/compiler/source_finder.rs | 25 ------------------------- 2 files changed, 26 deletions(-) delete mode 100644 src/compiler/source_finder.rs diff --git a/src/compiler/mod.rs b/src/compiler/mod.rs index cbdc9b9..dced7c8 100644 --- a/src/compiler/mod.rs +++ b/src/compiler/mod.rs @@ -6,7 +6,6 @@ mod compiler_source; mod cst; mod native_fn; mod rst; -mod source_finder; mod util; pub(crate) use compilation_result::Compilation; diff --git a/src/compiler/source_finder.rs b/src/compiler/source_finder.rs deleted file mode 100644 index 1c12e0c..0000000 --- a/src/compiler/source_finder.rs +++ /dev/null @@ -1,25 +0,0 @@ -use crate::compiler::{CompilerSource, FileCompilerSource}; -use std::path::PathBuf; - -pub(crate) trait SourceFinder { - fn find(&self, path: PathBuf) -> Option; -} - -pub(crate) struct FileSourceFinder { - root_dir: PathBuf, -} - -impl SourceFinder for FileSourceFinder { - fn find(&self, path: PathBuf) -> Option { - let path = self.root_dir.join(path); - - let source = FileCompilerSource::new(path); - Some(source) - } -} - -impl FileSourceFinder { - pub(crate) fn new(root_dir: PathBuf) -> FileSourceFinder { - FileSourceFinder { root_dir } - } -}