summaryrefslogtreecommitdiffstats
path: root/src/repl/handler.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2023-10-26 19:28:57 +0800
committersigoden <sigoden@gmail.com>2023-10-26 19:28:57 +0800
commitb3f8f27018b1bbb3c1eb59ef05acc2d2a420b45e (patch)
treee885d5bfed53515c8ff341d1c92c76aafbf70dae /src/repl/handler.rs
parentc3f9ef6c396ba692e82cdfaa929429c85eebd289 (diff)
downloadaichat-b3f8f27018b1bbb3c1eb59ef05acc2d2a420b45e.tar.gz
refactor: improve code quanity
Diffstat (limited to 'src/repl/handler.rs')
-rw-r--r--src/repl/handler.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/repl/handler.rs b/src/repl/handler.rs
index 45836ba..a061742 100644
--- a/src/repl/handler.rs
+++ b/src/repl/handler.rs
@@ -111,7 +111,8 @@ impl ReplCmdHandler {
ReplCmd::ReadFile(file) => {
let mut contents = String::new();
let mut file = fs::File::open(file).expect("Unable to open file");
- file.read_to_string(&mut contents).expect("Unable to read file");
+ file.read_to_string(&mut contents)
+ .expect("Unable to read file");
self.handle(ReplCmd::Submit(contents))?;
}
}