fix type defaults for trait

part of the i16->isize transition
This commit is contained in:
bunnie 2025-03-03 02:12:57 +08:00
parent 433d632926
commit da5c215477

View file

@ -24,8 +24,10 @@ pub enum ActionType {
#[enum_dispatch] #[enum_dispatch]
pub trait ActionApi { pub trait ActionApi {
fn height(&self, glyph_height: i16, margin: i16, _modal: &Modal) -> i16 { glyph_height + margin * 2 } fn height(&self, glyph_height: isize, margin: isize, _modal: &Modal) -> isize {
fn redraw(&self, _at_height: i16, _modal: &Modal) { unimplemented!() } glyph_height + margin * 2
}
fn redraw(&self, _at_height: isize, _modal: &Modal) { unimplemented!() }
fn close(&mut self) {} fn close(&mut self) {}
fn is_password(&self) -> bool { false } fn is_password(&self) -> bool { false }
/// navigation is one of '∴' | '←' | '→' | '↑' | '↓' /// navigation is one of '∴' | '←' | '→' | '↑' | '↓'