Skip to content

Commit

Permalink
python: correct style
Browse files Browse the repository at this point in the history
  • Loading branch information
ElsaLopez133 committed Nov 5, 2024
1 parent cc3ca98 commit 9644815
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lakers-python/src/initiator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,11 @@ impl PyEdhocInitiator {
) -> PyResult<Option<EADItem>> {
let message_4 = EdhocMessageBuffer::new_from_slice(message_4.as_slice())?;

match i_process_message_4(&mut self.wait_m4.take().ok_or(StateMismatch)?, &mut default_crypto(), &message_4) {
match i_process_message_4(
&mut self.wait_m4.take().ok_or(StateMismatch)?,
&mut default_crypto(),
&message_4,
) {
Ok((state, ead_4)) => {
self.completed = Some(state);
Ok(ead_4)
Expand Down
6 changes: 5 additions & 1 deletion lakers-python/src/responder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,11 @@ impl PyEdhocResponder {
py: Python<'a>,
ead_4: Option<EADItem>,
) -> PyResult<Bound<'a, PyBytes>> {
match r_prepare_message_4(&self.processed_m3.take().ok_or(StateMismatch)?, &mut default_crypto(), &ead_4) {
match r_prepare_message_4(
&self.processed_m3.take().ok_or(StateMismatch)?,
&mut default_crypto(),
&ead_4,
) {
Ok((state, message_4)) => {
self.completed = Some(state);
Ok(PyBytes::new_bound(py, message_4.as_slice()))
Expand Down

0 comments on commit 9644815

Please sign in to comment.