Remove include_paths() methods from AsmSession

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2020-02-28 15:08:17 -05:00
parent 782a2ea4e9
commit ad7c22c168

View File

@@ -94,20 +94,12 @@ impl AsmSession {
Ok(()) Ok(())
} }
pub fn include_paths(&self) -> &Vec<PathBuf> {
&self.include_paths
}
pub fn include_paths_mut(&mut self) -> &mut Vec<PathBuf> {
&mut self.include_paths
}
fn resolve_include_path(&self, path: impl AsRef<Path>) -> Option<PathBuf> { fn resolve_include_path(&self, path: impl AsRef<Path>) -> Option<PathBuf> {
let path = path.as_ref(); let path = path.as_ref();
self.current_include_path() self.current_include_path()
.and_then(|last_path| last_path.parent()) .and_then(|last_path| last_path.parent())
.map(|last_dir| last_dir.join(path)) .map(|last_dir| last_dir.join(path))
.or_else(|| self.include_paths() .or_else(|| self.include_paths
.iter() .iter()
.filter_map(|include| include.join(path).canonicalize().ok()) .filter_map(|include| include.join(path).canonicalize().ok())
.next()) .next())