Make ConfigPaths store as PathBuf

- These are paths, we can just store them raw.
This commit is contained in:
Henrik Hørlück Berg 2023-08-18 07:16:09 +02:00 committed by Fabian Boehm
parent 55302629cd
commit 360ba46660

View file

@ -5,6 +5,7 @@ use bitflags::bitflags;
use lazy_static::lazy_static; use lazy_static::lazy_static;
use libc::c_int; use libc::c_int;
use std::collections::HashMap; use std::collections::HashMap;
use std::path::PathBuf;
use std::sync::Arc; use std::sync::Arc;
/// The character used to delimit path and non-path variables in exporting and in string expansion. /// The character used to delimit path and non-path variables in exporting and in string expansion.
@ -77,11 +78,12 @@ impl Default for EnvStackSetResult {
/// A struct of configuration directories, determined in main() that fish will optionally pass to /// A struct of configuration directories, determined in main() that fish will optionally pass to
/// env_init. /// env_init.
#[derive(Default)]
pub struct ConfigPaths { pub struct ConfigPaths {
pub data: WString, // e.g., /usr/local/share pub data: PathBuf, // e.g., /usr/local/share
pub sysconf: WString, // e.g., /usr/local/etc pub sysconf: PathBuf, // e.g., /usr/local/etc
pub doc: WString, // e.g., /usr/local/share/doc/fish pub doc: PathBuf, // e.g., /usr/local/share/doc/fish
pub bin: WString, // e.g., /usr/local/bin pub bin: PathBuf, // e.g., /usr/local/bin
} }
/// A collection of status and pipestatus. /// A collection of status and pipestatus.