mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
Reformat
This commit is contained in:
parent
367f124855
commit
87225ffa37
4 changed files with 98 additions and 166 deletions
|
|
@ -10,35 +10,35 @@ use crate::{Style, normalize_path};
|
||||||
|
|
||||||
#[derive(Deserialize, DeserializeOver1)]
|
#[derive(Deserialize, DeserializeOver1)]
|
||||||
pub struct Theme {
|
pub struct Theme {
|
||||||
pub flavor: Flavor,
|
pub flavor: Flavor,
|
||||||
pub app: App,
|
pub app: App,
|
||||||
pub mgr: Mgr,
|
pub mgr: Mgr,
|
||||||
pub tabs: Tabs,
|
pub tabs: Tabs,
|
||||||
pub mode: Mode,
|
pub mode: Mode,
|
||||||
pub indicator: Indicator,
|
pub indicator: Indicator,
|
||||||
pub status: Status,
|
pub status: Status,
|
||||||
pub which: Which,
|
pub which: Which,
|
||||||
pub confirm: Confirm,
|
pub confirm: Confirm,
|
||||||
pub spot: Spot,
|
pub spot: Spot,
|
||||||
pub notify: Notify,
|
pub notify: Notify,
|
||||||
pub pick: Pick,
|
pub pick: Pick,
|
||||||
pub input: Input,
|
pub input: Input,
|
||||||
pub cmp: Cmp,
|
pub cmp: Cmp,
|
||||||
pub tasks: Tasks,
|
pub tasks: Tasks,
|
||||||
pub help: Help,
|
pub help: Help,
|
||||||
|
|
||||||
// File-specific styles
|
// File-specific styles
|
||||||
#[serde(skip_serializing)]
|
#[serde(skip_serializing)]
|
||||||
pub filetype: Filetype,
|
pub filetype: Filetype,
|
||||||
#[serde(skip_serializing)]
|
#[serde(skip_serializing)]
|
||||||
pub icon: Icon,
|
pub icon: Icon,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, DeserializeOver2)]
|
#[derive(Deserialize, DeserializeOver2)]
|
||||||
pub struct App {
|
pub struct App {
|
||||||
pub overall: Style,
|
pub overall: Style,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub parent: Style,
|
pub parent: Style,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub current: Style,
|
pub current: Style,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
|
|
@ -50,26 +50,26 @@ pub struct Mgr {
|
||||||
pub cwd: Style,
|
pub cwd: Style,
|
||||||
|
|
||||||
// Find
|
// Find
|
||||||
pub find_keyword: Style,
|
pub find_keyword: Style,
|
||||||
pub find_position: Style,
|
pub find_position: Style,
|
||||||
|
|
||||||
// Symlink
|
// Symlink
|
||||||
pub symlink_target: Style,
|
pub symlink_target: Style,
|
||||||
|
|
||||||
// Marker
|
// Marker
|
||||||
pub marker_copied: Style,
|
pub marker_copied: Style,
|
||||||
pub marker_cut: Style,
|
pub marker_cut: Style,
|
||||||
pub marker_marked: Style,
|
pub marker_marked: Style,
|
||||||
pub marker_selected: Style,
|
pub marker_selected: Style,
|
||||||
|
|
||||||
// Count
|
// Count
|
||||||
pub count_copied: Style,
|
pub count_copied: Style,
|
||||||
pub count_cut: Style,
|
pub count_cut: Style,
|
||||||
pub count_selected: Style,
|
pub count_selected: Style,
|
||||||
|
|
||||||
// Border
|
// Border
|
||||||
pub border_symbol: String,
|
pub border_symbol: String,
|
||||||
pub border_style: Style,
|
pub border_style: Style,
|
||||||
|
|
||||||
// Highlighting
|
// Highlighting
|
||||||
pub syntect_theme: PathBuf,
|
pub syntect_theme: PathBuf,
|
||||||
|
|
@ -77,7 +77,7 @@ pub struct Mgr {
|
||||||
|
|
||||||
#[derive(Deserialize, DeserializeOver2)]
|
#[derive(Deserialize, DeserializeOver2)]
|
||||||
pub struct Tabs {
|
pub struct Tabs {
|
||||||
pub active: Style,
|
pub active: Style,
|
||||||
pub inactive: Style,
|
pub inactive: Style,
|
||||||
|
|
||||||
pub sep_inner: TabsSep,
|
pub sep_inner: TabsSep,
|
||||||
|
|
@ -86,25 +86,25 @@ pub struct Tabs {
|
||||||
|
|
||||||
#[derive(Deserialize, DeserializeOver2)]
|
#[derive(Deserialize, DeserializeOver2)]
|
||||||
pub struct TabsSep {
|
pub struct TabsSep {
|
||||||
pub open: String,
|
pub open: String,
|
||||||
pub close: String,
|
pub close: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, DeserializeOver2)]
|
#[derive(Deserialize, DeserializeOver2)]
|
||||||
pub struct Mode {
|
pub struct Mode {
|
||||||
pub normal_main: Style,
|
pub normal_main: Style,
|
||||||
pub normal_alt: Style,
|
pub normal_alt: Style,
|
||||||
|
|
||||||
pub select_main: Style,
|
pub select_main: Style,
|
||||||
pub select_alt: Style,
|
pub select_alt: Style,
|
||||||
|
|
||||||
pub unset_main: Style,
|
pub unset_main: Style,
|
||||||
pub unset_alt: Style,
|
pub unset_alt: Style,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, DeserializeOver2)]
|
#[derive(Deserialize, DeserializeOver2)]
|
||||||
pub struct Indicator {
|
pub struct Indicator {
|
||||||
pub parent: Style,
|
pub parent: Style,
|
||||||
pub current: Style,
|
pub current: Style,
|
||||||
pub preview: Style,
|
pub preview: Style,
|
||||||
pub padding: IndicatorPadding,
|
pub padding: IndicatorPadding,
|
||||||
|
|
@ -112,32 +112,32 @@ pub struct Indicator {
|
||||||
|
|
||||||
#[derive(Deserialize, DeserializeOver2)]
|
#[derive(Deserialize, DeserializeOver2)]
|
||||||
pub struct IndicatorPadding {
|
pub struct IndicatorPadding {
|
||||||
pub open: String,
|
pub open: String,
|
||||||
pub close: String,
|
pub close: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, DeserializeOver2)]
|
#[derive(Deserialize, DeserializeOver2)]
|
||||||
pub struct Status {
|
pub struct Status {
|
||||||
pub overall: Style,
|
pub overall: Style,
|
||||||
pub sep_left: StatusSep,
|
pub sep_left: StatusSep,
|
||||||
pub sep_right: StatusSep,
|
pub sep_right: StatusSep,
|
||||||
|
|
||||||
// Permissions
|
// Permissions
|
||||||
pub perm_sep: Style,
|
pub perm_sep: Style,
|
||||||
pub perm_type: Style,
|
pub perm_type: Style,
|
||||||
pub perm_read: Style,
|
pub perm_read: Style,
|
||||||
pub perm_write: Style,
|
pub perm_write: Style,
|
||||||
pub perm_exec: Style,
|
pub perm_exec: Style,
|
||||||
|
|
||||||
// Progress
|
// Progress
|
||||||
pub progress_label: Style,
|
pub progress_label: Style,
|
||||||
pub progress_normal: Style,
|
pub progress_normal: Style,
|
||||||
pub progress_error: Style,
|
pub progress_error: Style,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, DeserializeOver2)]
|
#[derive(Deserialize, DeserializeOver2)]
|
||||||
pub struct StatusSep {
|
pub struct StatusSep {
|
||||||
pub open: String,
|
pub open: String,
|
||||||
pub close: String,
|
pub close: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -149,83 +149,83 @@ pub struct Which {
|
||||||
pub rest: Style,
|
pub rest: Style,
|
||||||
pub desc: Style,
|
pub desc: Style,
|
||||||
|
|
||||||
pub separator: String,
|
pub separator: String,
|
||||||
pub separator_style: Style,
|
pub separator_style: Style,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, DeserializeOver2)]
|
#[derive(Deserialize, DeserializeOver2)]
|
||||||
pub struct Confirm {
|
pub struct Confirm {
|
||||||
pub border: Style,
|
pub border: Style,
|
||||||
pub title: Style,
|
pub title: Style,
|
||||||
pub body: Style,
|
pub body: Style,
|
||||||
pub list: Style,
|
pub list: Style,
|
||||||
|
|
||||||
pub btn_yes: Style,
|
pub btn_yes: Style,
|
||||||
pub btn_no: Style,
|
pub btn_no: Style,
|
||||||
pub btn_labels: [String; 2],
|
pub btn_labels: [String; 2],
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, DeserializeOver2)]
|
#[derive(Deserialize, DeserializeOver2)]
|
||||||
pub struct Spot {
|
pub struct Spot {
|
||||||
pub border: Style,
|
pub border: Style,
|
||||||
pub title: Style,
|
pub title: Style,
|
||||||
|
|
||||||
pub tbl_col: Style,
|
pub tbl_col: Style,
|
||||||
pub tbl_cell: Style,
|
pub tbl_cell: Style,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, DeserializeOver2)]
|
#[derive(Deserialize, DeserializeOver2)]
|
||||||
pub struct Notify {
|
pub struct Notify {
|
||||||
pub title_info: Style,
|
pub title_info: Style,
|
||||||
pub title_warn: Style,
|
pub title_warn: Style,
|
||||||
pub title_error: Style,
|
pub title_error: Style,
|
||||||
|
|
||||||
pub icon_info: String,
|
pub icon_info: String,
|
||||||
pub icon_warn: String,
|
pub icon_warn: String,
|
||||||
pub icon_error: String,
|
pub icon_error: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, DeserializeOver2)]
|
#[derive(Deserialize, DeserializeOver2)]
|
||||||
pub struct Pick {
|
pub struct Pick {
|
||||||
pub border: Style,
|
pub border: Style,
|
||||||
pub active: Style,
|
pub active: Style,
|
||||||
pub inactive: Style,
|
pub inactive: Style,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, DeserializeOver2)]
|
#[derive(Deserialize, DeserializeOver2)]
|
||||||
pub struct Input {
|
pub struct Input {
|
||||||
pub border: Style,
|
pub border: Style,
|
||||||
pub title: Style,
|
pub title: Style,
|
||||||
pub value: Style,
|
pub value: Style,
|
||||||
pub selected: Style,
|
pub selected: Style,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, DeserializeOver2)]
|
#[derive(Deserialize, DeserializeOver2)]
|
||||||
pub struct Cmp {
|
pub struct Cmp {
|
||||||
pub border: Style,
|
pub border: Style,
|
||||||
pub active: Style,
|
pub active: Style,
|
||||||
pub inactive: Style,
|
pub inactive: Style,
|
||||||
|
|
||||||
pub icon_file: String,
|
pub icon_file: String,
|
||||||
pub icon_folder: String,
|
pub icon_folder: String,
|
||||||
pub icon_command: String,
|
pub icon_command: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, DeserializeOver2)]
|
#[derive(Deserialize, DeserializeOver2)]
|
||||||
pub struct Tasks {
|
pub struct Tasks {
|
||||||
pub border: Style,
|
pub border: Style,
|
||||||
pub title: Style,
|
pub title: Style,
|
||||||
pub hovered: Style,
|
pub hovered: Style,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, DeserializeOver2)]
|
#[derive(Deserialize, DeserializeOver2)]
|
||||||
pub struct Help {
|
pub struct Help {
|
||||||
pub on: Style,
|
pub on: Style,
|
||||||
pub run: Style,
|
pub run: Style,
|
||||||
pub desc: Style,
|
pub desc: Style,
|
||||||
|
|
||||||
pub hovered: Style,
|
pub hovered: Style,
|
||||||
pub footer: Style,
|
pub footer: Style,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Theme {
|
impl Theme {
|
||||||
|
|
@ -253,19 +253,11 @@ impl Theme {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl App {
|
impl App {
|
||||||
pub fn bg_color(&self) -> String {
|
pub fn bg_color(&self) -> String { self.overall.bg.map(|c| c.to_string()).unwrap_or_default() }
|
||||||
self.overall.bg.map(|c| c.to_string()).unwrap_or_default()
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parent_bg(&self) -> String {
|
pub fn parent_bg(&self) -> String { self.parent.bg.map(|c| c.to_string()).unwrap_or_default() }
|
||||||
self.parent.bg.map(|c| c.to_string()).unwrap_or_default()
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn current_bg(&self) -> String {
|
pub fn current_bg(&self) -> String { self.current.bg.map(|c| c.to_string()).unwrap_or_default() }
|
||||||
self.current.bg.map(|c| c.to_string()).unwrap_or_default()
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn preview_bg(&self) -> String {
|
pub fn preview_bg(&self) -> String { self.preview.bg.map(|c| c.to_string()).unwrap_or_default() }
|
||||||
self.preview.bg.map(|c| c.to_string()).unwrap_or_default()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
use mlua::{ObjectLike, Table};
|
use mlua::{ObjectLike, Table};
|
||||||
use ratatui::{
|
use ratatui::{buffer::Buffer, layout::{Constraint, Direction, Layout, Rect}, widgets::Widget};
|
||||||
buffer::Buffer,
|
|
||||||
layout::{Constraint, Direction, Layout, Rect},
|
|
||||||
widgets::Widget,
|
|
||||||
};
|
|
||||||
use tracing::error;
|
use tracing::error;
|
||||||
use yazi_binding::elements::render_once;
|
use yazi_binding::elements::render_once;
|
||||||
use yazi_config::{THEME, YAZI};
|
use yazi_config::{THEME, YAZI};
|
||||||
|
|
@ -17,9 +13,7 @@ pub(super) struct Root<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Root<'a> {
|
impl<'a> Root<'a> {
|
||||||
pub(super) fn new(core: &'a Core) -> Self {
|
pub(super) fn new(core: &'a Core) -> Self { Self { core } }
|
||||||
Self { core }
|
|
||||||
}
|
|
||||||
|
|
||||||
pub(super) fn reflow(area: Rect) -> mlua::Result<Table> {
|
pub(super) fn reflow(area: Rect) -> mlua::Result<Table> {
|
||||||
let area = yazi_binding::elements::Rect::from(area);
|
let area = yazi_binding::elements::Rect::from(area);
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,8 @@
|
||||||
use std::{
|
use std::{io, ops::{Deref, DerefMut}, sync::atomic::{AtomicBool, Ordering}};
|
||||||
io,
|
|
||||||
ops::{Deref, DerefMut},
|
|
||||||
sync::atomic::{AtomicBool, Ordering},
|
|
||||||
};
|
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use crossterm::{
|
use crossterm::{event::{DisableBracketedPaste, DisableMouseCapture, EnableBracketedPaste, EnableMouseCapture, KeyboardEnhancementFlags, PopKeyboardEnhancementFlags, PushKeyboardEnhancementFlags}, execute, queue, style::Print, terminal::{EnterAlternateScreen, LeaveAlternateScreen, SetTitle, disable_raw_mode, enable_raw_mode}};
|
||||||
event::{
|
use ratatui::{CompletedFrame, Frame, Terminal, backend::CrosstermBackend, buffer::Buffer, layout::Rect};
|
||||||
DisableBracketedPaste, DisableMouseCapture, EnableBracketedPaste, EnableMouseCapture,
|
|
||||||
KeyboardEnhancementFlags, PopKeyboardEnhancementFlags, PushKeyboardEnhancementFlags,
|
|
||||||
},
|
|
||||||
execute, queue,
|
|
||||||
style::Print,
|
|
||||||
terminal::{
|
|
||||||
EnterAlternateScreen, LeaveAlternateScreen, SetTitle, disable_raw_mode, enable_raw_mode,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
use ratatui::{
|
|
||||||
CompletedFrame, Frame, Terminal, backend::CrosstermBackend, buffer::Buffer, layout::Rect,
|
|
||||||
};
|
|
||||||
use yazi_adapter::{Emulator, Mux, TMUX};
|
use yazi_adapter::{Emulator, Mux, TMUX};
|
||||||
use yazi_config::{THEME, YAZI};
|
use yazi_config::{THEME, YAZI};
|
||||||
use yazi_shared::SyncCell;
|
use yazi_shared::SyncCell;
|
||||||
|
|
@ -27,16 +11,16 @@ use yazi_term::tty::{TTY, TtyWriter};
|
||||||
static CSI_U: AtomicBool = AtomicBool::new(false);
|
static CSI_U: AtomicBool = AtomicBool::new(false);
|
||||||
|
|
||||||
pub(super) struct Term {
|
pub(super) struct Term {
|
||||||
inner: Terminal<CrosstermBackend<TtyWriter<'static>>>,
|
inner: Terminal<CrosstermBackend<TtyWriter<'static>>>,
|
||||||
last_area: Rect,
|
last_area: Rect,
|
||||||
last_buffer: Buffer,
|
last_buffer: Buffer,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Term {
|
impl Term {
|
||||||
pub(super) fn start() -> Result<Self> {
|
pub(super) fn start() -> Result<Self> {
|
||||||
let mut term = Self {
|
let mut term = Self {
|
||||||
inner: Terminal::new(CrosstermBackend::new(TTY.writer()))?,
|
inner: Terminal::new(CrosstermBackend::new(TTY.writer()))?,
|
||||||
last_area: Default::default(),
|
last_area: Default::default(),
|
||||||
last_buffer: Default::default(),
|
last_buffer: Default::default(),
|
||||||
};
|
};
|
||||||
let background = THEME.app.bg_color();
|
let background = THEME.app.bg_color();
|
||||||
|
|
@ -165,21 +149,15 @@ impl Term {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Drop for Term {
|
impl Drop for Term {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) { self.stop().ok(); }
|
||||||
self.stop().ok();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Deref for Term {
|
impl Deref for Term {
|
||||||
type Target = Terminal<CrosstermBackend<TtyWriter<'static>>>;
|
type Target = Terminal<CrosstermBackend<TtyWriter<'static>>>;
|
||||||
|
|
||||||
fn deref(&self) -> &Self::Target {
|
fn deref(&self) -> &Self::Target { &self.inner }
|
||||||
&self.inner
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl DerefMut for Term {
|
impl DerefMut for Term {
|
||||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
fn deref_mut(&mut self) -> &mut Self::Target { &mut self.inner }
|
||||||
&mut self.inner
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,9 +25,7 @@ pub fn compose() -> Composer<ComposerGet, ComposerSet> {
|
||||||
.into_lua(lua)
|
.into_lua(lua)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set(_: &Lua, _: &[u8], value: Value) -> mlua::Result<Value> {
|
fn set(_: &Lua, _: &[u8], value: Value) -> mlua::Result<Value> { Ok(value) }
|
||||||
Ok(value)
|
|
||||||
}
|
|
||||||
|
|
||||||
Composer::new(get, set)
|
Composer::new(get, set)
|
||||||
}
|
}
|
||||||
|
|
@ -44,9 +42,7 @@ fn app() -> Composer<ComposerGet, ComposerSet> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set(_: &Lua, _: &[u8], value: Value) -> mlua::Result<Value> {
|
fn set(_: &Lua, _: &[u8], value: Value) -> mlua::Result<Value> { Ok(value) }
|
||||||
Ok(value)
|
|
||||||
}
|
|
||||||
|
|
||||||
Composer::new(get, set)
|
Composer::new(get, set)
|
||||||
}
|
}
|
||||||
|
|
@ -94,9 +90,7 @@ fn mgr() -> Composer<ComposerGet, ComposerSet> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set(_: &Lua, _: &[u8], value: Value) -> mlua::Result<Value> {
|
fn set(_: &Lua, _: &[u8], value: Value) -> mlua::Result<Value> { Ok(value) }
|
||||||
Ok(value)
|
|
||||||
}
|
|
||||||
|
|
||||||
Composer::new(get, set)
|
Composer::new(get, set)
|
||||||
}
|
}
|
||||||
|
|
@ -125,9 +119,7 @@ fn tabs() -> Composer<ComposerGet, ComposerSet> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set(_: &Lua, _: &[u8], value: Value) -> mlua::Result<Value> {
|
fn set(_: &Lua, _: &[u8], value: Value) -> mlua::Result<Value> { Ok(value) }
|
||||||
Ok(value)
|
|
||||||
}
|
|
||||||
|
|
||||||
Composer::new(get, set)
|
Composer::new(get, set)
|
||||||
}
|
}
|
||||||
|
|
@ -149,9 +141,7 @@ fn mode() -> Composer<ComposerGet, ComposerSet> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set(_: &Lua, _: &[u8], value: Value) -> mlua::Result<Value> {
|
fn set(_: &Lua, _: &[u8], value: Value) -> mlua::Result<Value> { Ok(value) }
|
||||||
Ok(value)
|
|
||||||
}
|
|
||||||
|
|
||||||
Composer::new(get, set)
|
Composer::new(get, set)
|
||||||
}
|
}
|
||||||
|
|
@ -174,9 +164,7 @@ fn indicator() -> Composer<ComposerGet, ComposerSet> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set(_: &Lua, _: &[u8], value: Value) -> mlua::Result<Value> {
|
fn set(_: &Lua, _: &[u8], value: Value) -> mlua::Result<Value> { Ok(value) }
|
||||||
Ok(value)
|
|
||||||
}
|
|
||||||
|
|
||||||
Composer::new(get, set)
|
Composer::new(get, set)
|
||||||
}
|
}
|
||||||
|
|
@ -213,9 +201,7 @@ fn status() -> Composer<ComposerGet, ComposerSet> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set(_: &Lua, _: &[u8], value: Value) -> mlua::Result<Value> {
|
fn set(_: &Lua, _: &[u8], value: Value) -> mlua::Result<Value> { Ok(value) }
|
||||||
Ok(value)
|
|
||||||
}
|
|
||||||
|
|
||||||
Composer::new(get, set)
|
Composer::new(get, set)
|
||||||
}
|
}
|
||||||
|
|
@ -237,9 +223,7 @@ fn which() -> Composer<ComposerGet, ComposerSet> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set(_: &Lua, _: &[u8], value: Value) -> mlua::Result<Value> {
|
fn set(_: &Lua, _: &[u8], value: Value) -> mlua::Result<Value> { Ok(value) }
|
||||||
Ok(value)
|
|
||||||
}
|
|
||||||
|
|
||||||
Composer::new(get, set)
|
Composer::new(get, set)
|
||||||
}
|
}
|
||||||
|
|
@ -266,9 +250,7 @@ fn confirm() -> Composer<ComposerGet, ComposerSet> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set(_: &Lua, _: &[u8], value: Value) -> mlua::Result<Value> {
|
fn set(_: &Lua, _: &[u8], value: Value) -> mlua::Result<Value> { Ok(value) }
|
||||||
Ok(value)
|
|
||||||
}
|
|
||||||
|
|
||||||
Composer::new(get, set)
|
Composer::new(get, set)
|
||||||
}
|
}
|
||||||
|
|
@ -287,9 +269,7 @@ fn spot() -> Composer<ComposerGet, ComposerSet> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set(_: &Lua, _: &[u8], value: Value) -> mlua::Result<Value> {
|
fn set(_: &Lua, _: &[u8], value: Value) -> mlua::Result<Value> { Ok(value) }
|
||||||
Ok(value)
|
|
||||||
}
|
|
||||||
|
|
||||||
Composer::new(get, set)
|
Composer::new(get, set)
|
||||||
}
|
}
|
||||||
|
|
@ -310,9 +290,7 @@ fn notify() -> Composer<ComposerGet, ComposerSet> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set(_: &Lua, _: &[u8], value: Value) -> mlua::Result<Value> {
|
fn set(_: &Lua, _: &[u8], value: Value) -> mlua::Result<Value> { Ok(value) }
|
||||||
Ok(value)
|
|
||||||
}
|
|
||||||
|
|
||||||
Composer::new(get, set)
|
Composer::new(get, set)
|
||||||
}
|
}
|
||||||
|
|
@ -329,9 +307,7 @@ fn pick() -> Composer<ComposerGet, ComposerSet> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set(_: &Lua, _: &[u8], value: Value) -> mlua::Result<Value> {
|
fn set(_: &Lua, _: &[u8], value: Value) -> mlua::Result<Value> { Ok(value) }
|
||||||
Ok(value)
|
|
||||||
}
|
|
||||||
|
|
||||||
Composer::new(get, set)
|
Composer::new(get, set)
|
||||||
}
|
}
|
||||||
|
|
@ -349,9 +325,7 @@ fn input() -> Composer<ComposerGet, ComposerSet> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set(_: &Lua, _: &[u8], value: Value) -> mlua::Result<Value> {
|
fn set(_: &Lua, _: &[u8], value: Value) -> mlua::Result<Value> { Ok(value) }
|
||||||
Ok(value)
|
|
||||||
}
|
|
||||||
|
|
||||||
Composer::new(get, set)
|
Composer::new(get, set)
|
||||||
}
|
}
|
||||||
|
|
@ -372,9 +346,7 @@ fn cmp() -> Composer<ComposerGet, ComposerSet> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set(_: &Lua, _: &[u8], value: Value) -> mlua::Result<Value> {
|
fn set(_: &Lua, _: &[u8], value: Value) -> mlua::Result<Value> { Ok(value) }
|
||||||
Ok(value)
|
|
||||||
}
|
|
||||||
|
|
||||||
Composer::new(get, set)
|
Composer::new(get, set)
|
||||||
}
|
}
|
||||||
|
|
@ -391,9 +363,7 @@ fn tasks() -> Composer<ComposerGet, ComposerSet> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set(_: &Lua, _: &[u8], value: Value) -> mlua::Result<Value> {
|
fn set(_: &Lua, _: &[u8], value: Value) -> mlua::Result<Value> { Ok(value) }
|
||||||
Ok(value)
|
|
||||||
}
|
|
||||||
|
|
||||||
Composer::new(get, set)
|
Composer::new(get, set)
|
||||||
}
|
}
|
||||||
|
|
@ -413,9 +383,7 @@ fn help() -> Composer<ComposerGet, ComposerSet> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set(_: &Lua, _: &[u8], value: Value) -> mlua::Result<Value> {
|
fn set(_: &Lua, _: &[u8], value: Value) -> mlua::Result<Value> { Ok(value) }
|
||||||
Ok(value)
|
|
||||||
}
|
|
||||||
|
|
||||||
Composer::new(get, set)
|
Composer::new(get, set)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue