Skip to content

Commit 69457a0

Browse files
Update main.rs
Formated source file
1 parent c28a63b commit 69457a0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/main.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ use powershell_script::PsScriptBuilder;
22
use rand::seq::SliceRandom;
33
use std::collections::HashMap;
44
use std::env;
5-
use std::thread;
65
use std::fs::File;
76
use std::io::{self, Error, Read, Write};
7+
use std::thread;
88
use std::thread::sleep;
99
use std::time::{Duration, SystemTime, UNIX_EPOCH};
1010

@@ -569,9 +569,7 @@ impl Executor {
569569
"thread" => {
570570
let code = self.pop_stack().get_string();
571571
let mut executor = self.clone();
572-
thread::spawn(move || {
573-
executor.evaluate_program(code)
574-
});
572+
thread::spawn(move || executor.evaluate_program(code));
575573
}
576574

577575
// シェルコマンドを実行
@@ -582,7 +580,9 @@ impl Executor {
582580
.hidden(false)
583581
.print_commands(false)
584582
.build();
585-
let _ = ps.run("[Console]::OutputEncoding = [System.Text.Encoding]::GetEncoding('utf-8')");
583+
let _ = ps.run(
584+
"[Console]::OutputEncoding = [System.Text.Encoding]::GetEncoding('utf-8')",
585+
);
586586
let result = ps.run(self.pop_stack().get_string().as_str());
587587
match result {
588588
Ok(i) => self.stack.push(Type::String(

0 commit comments

Comments
 (0)