mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 03:04:38 +08:00
Added constructor for Settings called with_path
This commit is contained in:
1 parent
7a3f965396
commit
01486830e3
1 file changed
+8
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user