Added constructor for Settings called with_path

This commit is contained in:
LucaSforza committed 2023-06-07 17:56:07 +02:00
1 parent 7a3f965396
commit 01486830e3
1 file changed
+8
+8
View File
@@ -82,6 +82,14 @@ pub struct Settings {
pub profile_format: Option<String>,
}
impl Settings {
pub fn with_path(path: String) -> Self {
let mut settings = Self::default();
settings.path_list.push(path);
settings
}
}
/// Sensible default settings.
impl Default for Settings {
fn default() -> Self {