Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
sxyazi committed Jan 17, 2024
1 parent 42d0f0f commit 9577d82
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions yazi-plugin/src/process/child.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ impl Child {
impl UserData for Child {
fn add_methods<'lua, M: mlua::UserDataMethods<'lua, Self>>(methods: &mut M) {
#[inline]
// TODO: return mlua::String instead of String
async fn read_line(me: &mut Child) -> (String, u8) {
async fn read(t: Option<impl AsyncBufReadExt + Unpin>) -> Option<String> {
let mut r = t?;
Expand Down
2 changes: 1 addition & 1 deletion yazi-plugin/src/process/command.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::{ffi::OsStr, process::Stdio};
use std::process::Stdio;

use mlua::{AnyUserData, IntoLua, Lua, Table, UserData, Value};

Expand Down
4 changes: 2 additions & 2 deletions yazi-plugin/src/utils/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ impl Utils {

match k {
Value::Integer(_) => {
args.push(v.to_str()?.to_owned());
args.push(v.to_string_lossy().into_owned());
}
Value::String(s) => {
named.insert(s.to_str()?.replace('_', "-"), v.to_str()?.to_owned());
named.insert(s.to_str()?.replace('_', "-"), v.to_string_lossy().into_owned());
}
_ => return Err("invalid key in exec".into_lua_err()),
}
Expand Down

0 comments on commit 9577d82

Please sign in to comment.