diff options
| author | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-01-09 16:32:34 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-01-09 16:32:34 +0100 |
| commit | a4a68fdb178722e23e007b1f6bf72474caae4e97 (patch) | |
| tree | f014b783d301c9ceb878c783ba2b7b2054772cfe /lib/xixanta/src/lib.rs | |
| parent | 92092ccc245269e0c3a864d06f7e382a5bb9d8b0 (diff) | |
| download | tools.nes-a4a68fdb178722e23e007b1f6bf72474caae4e97.tar.gz tools.nes-a4a68fdb178722e23e007b1f6bf72474caae4e97.zip | |
Rename SourceInfo::working_directory to directory
Also documented the struct as it is exported.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'lib/xixanta/src/lib.rs')
| -rw-r--r-- | lib/xixanta/src/lib.rs | 8 |
1 files changed, 6 insertions, 2 deletions
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(), } } |
