Reorder enum variant fields, for consistency with others

This commit is contained in:
Marcin Kulik
2024-07-01 12:31:57 +02:00
parent 03700db200
commit 4cdc538c08
2 changed files with 3 additions and 3 deletions

View File

@@ -27,7 +27,7 @@ fn encode_event(event: session::Event) -> Vec<u8> {
use session::Event::*;
match event {
Init(size, time, theme, init) => {
Init(time, size, theme, init) => {
let (cols, rows): (u16, u16) = (size.0, size.1);
let cols_bytes = cols.to_le_bytes();
let rows_bytes = rows.to_le_bytes();

View File

@@ -19,7 +19,7 @@ pub struct Session {
#[derive(Clone)]
pub enum Event {
Init(tty::TtySize, u64, Option<tty::Theme>, String),
Init(u64, tty::TtySize, Option<tty::Theme>, String),
Stdout(u64, String),
Resize(u64, tty::TtySize),
}
@@ -69,8 +69,8 @@ impl Session {
pub fn subscribe(&self) -> Subscription {
let init = Event::Init(
self.tty_size,
self.elapsed_time(),
self.tty_size,
self.theme.clone(),
self.vt.dump(),
);