Moved record to data.
Some checks failed
MoreThanText/morethantext/pipeline/head There was a failure building this commit

This commit is contained in:
2024-11-09 12:45:19 -05:00
parent 4b836e453d
commit f966feb0e1
5 changed files with 25 additions and 32 deletions

View File

@ -1,5 +1,5 @@
mod client;
mod record;
mod data;
mod message;
mod router;
mod session;
@ -8,9 +8,7 @@ use client::{Client, ClientMsg};
use message::{Message, MsgData};
use router::Router;
use session::{Session, SessionData, SessionMsg};
use std::{
sync::mpsc::{channel, Sender},
};
use std::sync::mpsc::{channel, Sender};
/// Support functions for Messages.
pub trait Msg {
@ -84,13 +82,11 @@ impl MoreThanText {
let msg = Message::new(&req);
self.tx.send(msg).unwrap();
match rx.recv().unwrap().get_message() {
MsgData::Session(data) => {
match data {
SessionMsg::Opened(sess) => self.session = Some(sess.clone()),
_ => {},
}
MsgData::Session(data) => match data {
SessionMsg::Opened(sess) => self.session = Some(sess.clone()),
_ => {}
},
_ => {},
_ => {}
};
}
@ -115,8 +111,8 @@ impl MoreThanText {
impl Clone for MoreThanText {
fn clone(&self) -> Self {
Self {
session: None,
tx: self.tx.clone(),
session: None,
tx: self.tx.clone(),
}
}
}