Skip to content

Commit 401f477

Browse files
committed
Format main.rs
1 parent 9e53091 commit 401f477

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/main.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -144,19 +144,19 @@ fn shell_exec(vm: &mut VirtualMachine, source: &str, scope: PyObjectRef) -> bool
144144

145145
#[cfg(target_family = "windows")]
146146
fn get_history_path() -> String {
147-
//
148-
String::from(".repl_history.txt")
147+
//
148+
String::from(".repl_history.txt")
149149
}
150150

151151
#[cfg(target_family = "unix")]
152152
fn get_history_path() -> String {
153-
//work around for windows dependent builds. The xdg crate is unix specific
154-
//so access to the BaseDirectories struct breaks builds on python.
155-
extern crate xdg;
153+
//work around for windows dependent builds. The xdg crate is unix specific
154+
//so access to the BaseDirectories struct breaks builds on python.
155+
extern crate xdg;
156156

157157
let xdg_dirs = xdg::BaseDirectories::with_prefix("rustpython").unwrap();
158158
let repl_history_path = xdg_dirs.place_cache_file("repl_history.txt").unwrap();
159-
repl_history_path.to_str().unwrap()
159+
repl_history_path.to_str().unwrap()
160160
}
161161

162162
fn run_shell(vm: &mut VirtualMachine) -> PyResult {
@@ -171,8 +171,8 @@ fn run_shell(vm: &mut VirtualMachine) -> PyResult {
171171
let mut input = String::new();
172172
let mut rl = Editor::<()>::new();
173173

174-
//retrieve a history_path_str dependent to the os
175-
let repl_history_path_str = &get_history_path();
174+
//retrieve a history_path_str dependent to the os
175+
let repl_history_path_str = &get_history_path();
176176
if rl.load_history(repl_history_path_str).is_err() {
177177
println!("No previous history.");
178178
}

0 commit comments

Comments
 (0)