mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
..
This commit is contained in:
parent
9577818afb
commit
7db6d02333
2 changed files with 10 additions and 14 deletions
|
|
@ -30,13 +30,11 @@ impl FromLua for Align {
|
||||||
0 => ratatui::layout::Alignment::Left,
|
0 => ratatui::layout::Alignment::Left,
|
||||||
1 => ratatui::layout::Alignment::Center,
|
1 => ratatui::layout::Alignment::Center,
|
||||||
2 => ratatui::layout::Alignment::Right,
|
2 => ratatui::layout::Alignment::Right,
|
||||||
_ => {
|
_ => Err(mlua::Error::FromLuaConversionError {
|
||||||
return Err(mlua::Error::FromLuaConversionError {
|
|
||||||
from: value.type_name(),
|
from: value.type_name(),
|
||||||
to: "Align".to_string(),
|
to: "Align".to_string(),
|
||||||
message: Some("invalid value for Align".to_string()),
|
message: Some("invalid value for Align".to_string()),
|
||||||
});
|
})?,
|
||||||
}
|
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,13 +40,11 @@ impl FromLua for Wrap {
|
||||||
0 => None,
|
0 => None,
|
||||||
1 => Some(ratatui::widgets::Wrap { trim: false }),
|
1 => Some(ratatui::widgets::Wrap { trim: false }),
|
||||||
2 => Some(ratatui::widgets::Wrap { trim: true }),
|
2 => Some(ratatui::widgets::Wrap { trim: true }),
|
||||||
_ => {
|
_ => Err(mlua::Error::FromLuaConversionError {
|
||||||
return Err(mlua::Error::FromLuaConversionError {
|
|
||||||
from: value.type_name(),
|
from: value.type_name(),
|
||||||
to: "Wrap".to_string(),
|
to: "Wrap".to_string(),
|
||||||
message: Some("invalid value for Wrap".to_string()),
|
message: Some("invalid value for Wrap".to_string()),
|
||||||
});
|
})?,
|
||||||
}
|
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue