mirror of
https://github.com/lune-org/lune.git
synced 2025-05-04 10:43:57 +01:00
Replaced std::io::prelude with Write trait
This commit is contained in:
parent
4904842e96
commit
3c3959f7e4
1 changed files with 3 additions and 4 deletions
|
@ -1,8 +1,7 @@
|
|||
use blocking::unblock;
|
||||
use dialoguer::{theme::ColorfulTheme, Confirm, Input, MultiSelect, Select};
|
||||
use mlua::prelude::*;
|
||||
use std::io;
|
||||
use std::io::prelude::*;
|
||||
use std::io::Write;
|
||||
|
||||
use crate::lua::{
|
||||
stdio::{
|
||||
|
@ -29,12 +28,12 @@ pub fn create(lua: &'static Lua) -> LuaResult<LuaTable> {
|
|||
})?
|
||||
.with_function("write", |_, s: String| {
|
||||
print!("{s}");
|
||||
io::stdout().flush().expect("Could not flush stdout");
|
||||
std::io::stdout().flush().expect("Could not flush stdout");
|
||||
Ok(())
|
||||
})?
|
||||
.with_function("ewrite", |_, s: String| {
|
||||
eprint!("{s}");
|
||||
io::stderr().flush().expect("Could not flush stderr");
|
||||
std::io::stderr().flush().expect("Could not flush stderr");
|
||||
Ok(())
|
||||
})?
|
||||
.with_async_function("prompt", |_, options: PromptOptions| {
|
||||
|
|
Loading…
Add table
Reference in a new issue