From a4a68fdb178722e23e007b1f6bf72474caae4e97 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Thu, 9 Jan 2025 16:32:34 +0100 Subject: Rename SourceInfo::working_directory to directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also documented the struct as it is exported. Signed-off-by: Miquel Sabaté Solà --- lib/xixanta/src/lib.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/xixanta/src/lib.rs') diff --git a/lib/xixanta/src/lib.rs b/lib/xixanta/src/lib.rs index 2da8fd0..ce9be6d 100644 --- a/lib/xixanta/src/lib.rs +++ b/lib/xixanta/src/lib.rs @@ -1,16 +1,20 @@ #[macro_use] extern crate lazy_static; +/// Information for a file that has been parsed/assembled. #[derive(Clone, Debug, PartialEq)] pub struct SourceInfo { - pub working_directory: std::path::PathBuf, + /// Directory where the file is located. + pub directory: std::path::PathBuf, + + /// Friendly name for the given file. pub name: String, } impl Default for SourceInfo { fn default() -> Self { SourceInfo { - working_directory: std::env::current_dir().unwrap().to_path_buf(), + directory: std::env::current_dir().unwrap().to_path_buf(), name: "".to_string(), } } -- cgit v1.2.3