From f2f27e2d308551750eb6ab6603210b8a623c9678 Mon Sep 17 00:00:00 2001 From: occheung Date: Thu, 5 Sep 2024 11:59:10 +0800 Subject: [PATCH] runtime mgmt: remove cursor --- artiq/firmware/runtime/mgmt.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/artiq/firmware/runtime/mgmt.rs b/artiq/firmware/runtime/mgmt.rs index 0c1b423d6..176a4d7ba 100644 --- a/artiq/firmware/runtime/mgmt.rs +++ b/artiq/firmware/runtime/mgmt.rs @@ -398,11 +398,11 @@ mod remote_coremgmt { routing_table: &drtio_routing::RoutingTable, linkno: u8, destination: u8, stream: &mut TcpStream, key: &String, value: &Vec, _restart_idle: &Urc>) -> Result<(), Error> { - let mut message = Cursor::new(Vec::with_capacity(key.len() + value.len() + 4 * 2)); + let mut message = Vec::with_capacity(key.len() + value.len() + 4 * 2); message.write_string(key).unwrap(); message.write_bytes(value).unwrap(); - match drtio::partition_data(message.get_ref(), |slice, status, len: usize| { + match drtio::partition_data(&message, |slice, status, len: usize| { let reply = drtio::aux_transact(io, aux_mutex, ddma_mutex, subkernel_mutex, routing_table, linkno, &Packet::CoreMgmtConfigWriteRequest { destination: destination, length: len as u16, last: status.is_last(), data: *slice});