Skip to content

Commit bce3ee3

Browse files
author
Gleb Pomykalov
committed
Properly implement Debug for AF_ALG structures
1 parent 2e5358a commit bce3ee3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/unix/notbsd/android/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ cfg_if! {
492492
.field("salg_type", &self.salg_type)
493493
.field("salg_feat", &self.salg_feat)
494494
.field("salg_mask", &self.salg_mask)
495-
// .field("salg_name", &self.salg_name)
495+
.field("salg_name", &&self.salg_name[..])
496496
.finish()
497497
}
498498
}
@@ -529,7 +529,7 @@ cfg_if! {
529529
impl ::fmt::Debug for af_alg_iv {
530530
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
531531
f.debug_struct("af_alg_iv")
532-
// .field("iv", self.as_slice())
532+
.field("iv", &self.as_slice())
533533
.finish()
534534
}
535535
}

src/unix/notbsd/linux/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ cfg_if! {
711711
.field("salg_type", &self.salg_type)
712712
.field("salg_feat", &self.salg_feat)
713713
.field("salg_mask", &self.salg_mask)
714-
// .field("salg_name", &self.salg_name)
714+
.field("salg_name", &&self.salg_name[..])
715715
.finish()
716716
}
717717
}
@@ -748,7 +748,7 @@ cfg_if! {
748748
impl ::fmt::Debug for af_alg_iv {
749749
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
750750
f.debug_struct("af_alg_iv")
751-
// .field("iv", self.as_slice())
751+
.field("iv", &self.as_slice())
752752
.finish()
753753
}
754754
}

0 commit comments

Comments
 (0)