Loading Cargo.lock +1 −0 Original line number Diff line number Diff line Loading @@ -3092,6 +3092,7 @@ dependencies = [ "bitflags", "bytes", "caret", "educe", "hex", "hex-literal", "rand 0.8.5", Loading crates/tor-cell/Cargo.toml +1 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ repository="https://gitlab.torproject.org/tpo/core/arti.git/" [dependencies] caret = { path="../caret", version = "0.1.0"} educe = "0.4.6" tor-llcrypto = { path="../tor-llcrypto", version = "0.1.0"} tor-bytes = { path="../tor-bytes", version = "0.1.0"} tor-cert = { path="../tor-cert", version = "0.1.0"} Loading crates/tor-cell/src/chancell/msg.rs +5 −7 Original line number Diff line number Diff line Loading @@ -3,9 +3,10 @@ use super::{ChanCmd, RawCellBody, CELL_DATA_LEN}; use std::convert::TryInto; use std::net::{IpAddr, Ipv4Addr}; use tor_bytes::{self, Error, Readable, Reader, Result, Writer}; use tor_bytes::{self, skip_fmt, Error, Readable, Reader, Result, Writer}; use caret::caret_int; use educe::Educe; /// Trait for the 'bodies' of channel messages. pub trait Body: Readable { Loading Loading @@ -431,7 +432,8 @@ impl Readable for Created2 { /// /// A different protocol is defined over the relay cells; it is implemented /// in the [crate::relaycell] module. #[derive(Clone)] #[derive(Clone, Educe)] #[educe(Debug)] pub struct Relay { /// The contents of the relay cell as encoded for transfer. /// Loading @@ -440,6 +442,7 @@ pub struct Relay { /// places where we _don't_ Box things that we should, and more copies than /// necessary happen. We should refactor our data handling until we're mostly /// moving around pointers rather than copying data; see ticket #7. #[educe(Debug(method = "skip_fmt"))] body: Box<RawCellBody>, } impl Relay { Loading Loading @@ -472,11 +475,6 @@ impl Relay { ChanMsg::RelayEarly(self) } } impl std::fmt::Debug for Relay { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.debug_struct("Relay").finish() } } impl Body for Relay { fn into_message(self) -> ChanMsg { ChanMsg::Relay(self) Loading Loading
Cargo.lock +1 −0 Original line number Diff line number Diff line Loading @@ -3092,6 +3092,7 @@ dependencies = [ "bitflags", "bytes", "caret", "educe", "hex", "hex-literal", "rand 0.8.5", Loading
crates/tor-cell/Cargo.toml +1 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ repository="https://gitlab.torproject.org/tpo/core/arti.git/" [dependencies] caret = { path="../caret", version = "0.1.0"} educe = "0.4.6" tor-llcrypto = { path="../tor-llcrypto", version = "0.1.0"} tor-bytes = { path="../tor-bytes", version = "0.1.0"} tor-cert = { path="../tor-cert", version = "0.1.0"} Loading
crates/tor-cell/src/chancell/msg.rs +5 −7 Original line number Diff line number Diff line Loading @@ -3,9 +3,10 @@ use super::{ChanCmd, RawCellBody, CELL_DATA_LEN}; use std::convert::TryInto; use std::net::{IpAddr, Ipv4Addr}; use tor_bytes::{self, Error, Readable, Reader, Result, Writer}; use tor_bytes::{self, skip_fmt, Error, Readable, Reader, Result, Writer}; use caret::caret_int; use educe::Educe; /// Trait for the 'bodies' of channel messages. pub trait Body: Readable { Loading Loading @@ -431,7 +432,8 @@ impl Readable for Created2 { /// /// A different protocol is defined over the relay cells; it is implemented /// in the [crate::relaycell] module. #[derive(Clone)] #[derive(Clone, Educe)] #[educe(Debug)] pub struct Relay { /// The contents of the relay cell as encoded for transfer. /// Loading @@ -440,6 +442,7 @@ pub struct Relay { /// places where we _don't_ Box things that we should, and more copies than /// necessary happen. We should refactor our data handling until we're mostly /// moving around pointers rather than copying data; see ticket #7. #[educe(Debug(method = "skip_fmt"))] body: Box<RawCellBody>, } impl Relay { Loading Loading @@ -472,11 +475,6 @@ impl Relay { ChanMsg::RelayEarly(self) } } impl std::fmt::Debug for Relay { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.debug_struct("Relay").finish() } } impl Body for Relay { fn into_message(self) -> ChanMsg { ChanMsg::Relay(self) Loading