dotune 0.1.1

A cross-platform dotfile manager configured with Lua
1
2
3
4
5
6
7
8
9
10
use mlua::prelude::*;

pub fn bad_argument(to_func: &str, pos: usize, name: Option<&str>, message: &str) -> LuaError {
    LuaError::BadArgument {
        to: Some(to_func.to_string()),
        pos,
        name: name.map(ToOwned::to_owned),
        cause: message.into_lua_err().into(),
    }
}