@@ -109,10 +109,10 @@ impl Session {
109
109
///
110
110
/// Will result in `SnowError::StateProblem` if not in stateless transport mode.
111
111
#[ must_use]
112
- pub fn write_message_with_nonce ( & mut self , nonce : u64 , payload : & [ u8 ] , output : & mut [ u8 ] ) -> Result < usize , SnowError > {
112
+ pub fn write_message_with_nonce ( & self , nonce : u64 , payload : & [ u8 ] , output : & mut [ u8 ] ) -> Result < usize , SnowError > {
113
113
match * self {
114
- Session :: StatelessTransport ( ref mut state) => state. write_transport_message ( nonce, payload, output) ,
115
- _ => bail ! ( StateProblem :: StatelessTransportMode ) ,
114
+ Session :: StatelessTransport ( ref state) => state. write_transport_message ( nonce, payload, output) ,
115
+ _ => bail ! ( StateProblem :: StatelessTransportMode ) ,
116
116
}
117
117
}
118
118
@@ -149,10 +149,10 @@ impl Session {
149
149
///
150
150
/// Will result in `SnowError::StateProblem` if not in stateless transport mode.
151
151
#[ must_use]
152
- pub fn read_message_with_nonce ( & mut self , nonce : u64 , input : & [ u8 ] , payload : & mut [ u8 ] ) -> Result < usize , SnowError > {
152
+ pub fn read_message_with_nonce ( & self , nonce : u64 , input : & [ u8 ] , payload : & mut [ u8 ] ) -> Result < usize , SnowError > {
153
153
match * self {
154
- Session :: StatelessTransport ( ref mut state) => state. read_transport_message ( nonce, input, payload) ,
155
- _ => bail ! ( StateProblem :: StatelessTransportMode ) ,
154
+ Session :: StatelessTransport ( ref state) => state. read_transport_message ( nonce, input, payload) ,
155
+ _ => bail ! ( StateProblem :: StatelessTransportMode ) ,
156
156
}
157
157
}
158
158
@@ -339,4 +339,4 @@ impl TryFrom<HandshakeState> for StatelessTransportState {
339
339
fn try_from ( old : HandshakeState ) -> Result < Self , Self :: Error > {
340
340
StatelessTransportState :: new ( old)
341
341
}
342
- }
342
+ }
0 commit comments