🔊 fix deprecation warnings from new deps

main
_ 2023-08-31 20:11:33 -05:00
parent 3668caf9cf
commit 583e151b18
3 changed files with 14 additions and 14 deletions

View File

@ -144,7 +144,7 @@ impl GuiClient <'_> {
let gui = GuiPort::new (fltk_tx, self.ports.len ()); let gui = GuiPort::new (fltk_tx, self.ports.len ());
ports_col.add (&gui.row); ports_col.add (&gui.row);
ports_col.set_size (&gui.row, 30); ports_col.fixed (&gui.row, 30);
let port = Port { let port = Port {
gui, gui,
@ -176,20 +176,20 @@ fn main () -> anyhow::Result <()> {
let mut col = Flex::default ().column ().size_of_parent (); let mut col = Flex::default ().column ().size_of_parent ();
let frame_status = Frame::default (); let frame_status = Frame::default ();
col.set_size (&frame_status, 30); col.fixed (&frame_status, 30);
{ {
let mut row = Flex::default ().row (); let mut row = Flex::default ().row ();
let l = Frame::default ().with_label ("Server ID"); let l = Frame::default ().with_label ("Server ID");
row.set_size (&l, 120); row.fixed (&l, 120);
let l = Frame::default ().with_label ("Server port"); let l = Frame::default ().with_label ("Server port");
row.set_size (&l, 80); row.fixed (&l, 80);
let l = Frame::default ().with_label ("Local port"); let l = Frame::default ().with_label ("Local port");
row.set_size (&l, 80); row.fixed (&l, 80);
row.end (); row.end ();
col.set_size (&row, 30); col.fixed (&row, 30);
} }
let mut ports_col = Flex::default ().column (); let mut ports_col = Flex::default ().column ();
@ -198,7 +198,7 @@ fn main () -> anyhow::Result <()> {
let mut but_add_port = Button::default ().with_label ("+"); let mut but_add_port = Button::default ().with_label ("+");
but_add_port.set_trigger (CallbackTrigger::Release); but_add_port.set_trigger (CallbackTrigger::Release);
but_add_port.emit (fltk_tx, Message::AddPort); but_add_port.emit (fltk_tx, Message::AddPort);
col.set_size (&but_add_port, 30); col.fixed (&but_add_port, 30);
col.end (); col.end ();
@ -283,11 +283,11 @@ impl GuiPort {
let mut but_open = Button::default ().with_label ("Open"); let mut but_open = Button::default ().with_label ("Open");
let mut but_close = Button::default ().with_label ("Close"); let mut but_close = Button::default ().with_label ("Close");
row.set_size (&input_server_id, 120); row.fixed (&input_server_id, 120);
row.set_size (&input_server_port, 80); row.fixed (&input_server_port, 80);
row.set_size (&input_client_port, 80); row.fixed (&input_client_port, 80);
row.set_size (&but_open, 80); row.fixed (&but_open, 80);
row.set_size (&but_close, 80); row.fixed (&but_close, 80);
input_client_port.set_value (""); input_client_port.set_value ("");
input_client_port.set_readonly (true); input_client_port.set_readonly (true);

View File

@ -129,7 +129,7 @@ pub async fn handle_response (
let magic_header = base64::decode (magic_header).map_err (PtthMagicHeaderNotBase64)?; let magic_header = base64::decode (magic_header).map_err (PtthMagicHeaderNotBase64)?;
let resp_parts: http_serde::ResponseParts = rmp_serde::from_read_ref (&magic_header).map_err (PtthMagicHeaderNotMsgPack)?; let resp_parts: http_serde::ResponseParts = rmp_serde::from_slice (&magic_header).map_err (PtthMagicHeaderNotMsgPack)?;
// Intercept the body packets here so we can check when the stream // Intercept the body packets here so we can check when the stream
// ends or errors out // ends or errors out

View File

@ -414,7 +414,7 @@ impl State {
} }
let body = req_resp.bytes ().await.map_err (ServerError::CantCollectWrappedRequests)?; let body = req_resp.bytes ().await.map_err (ServerError::CantCollectWrappedRequests)?;
let wrapped_reqs: Vec <http_serde::WrappedRequest> = rmp_serde::from_read_ref (&body) let wrapped_reqs: Vec <http_serde::WrappedRequest> = rmp_serde::from_slice (&body)
.map_err (ServerError::CantParseWrappedRequests)?; .map_err (ServerError::CantParseWrappedRequests)?;
Ok (wrapped_reqs) Ok (wrapped_reqs)