Remove include_paths() methods from AsmSession
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -94,20 +94,12 @@ impl AsmSession {
|
||||
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> {
|
||||
let path = path.as_ref();
|
||||
self.current_include_path()
|
||||
.and_then(|last_path| last_path.parent())
|
||||
.map(|last_dir| last_dir.join(path))
|
||||
.or_else(|| self.include_paths()
|
||||
.or_else(|| self.include_paths
|
||||
.iter()
|
||||
.filter_map(|include| include.join(path).canonicalize().ok())
|
||||
.next())
|
||||
|
||||
Reference in New Issue
Block a user