summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Pomykalov <gleb@lancastr.com>2019-02-20 01:04:50 +0300
committerGleb Pomykalov <gleb@lancastr.com>2019-02-20 01:04:50 +0300
commitbce3ee3e718982e3defea48bc4224e29e31788cb (patch)
treee11e5d108c246c023c1ba51f16aa763c84821146
parent2e5358ae60b73a7328e63a85c61a7e8c9f84fc0f (diff)
downloadrust-libc-bce3ee3e718982e3defea48bc4224e29e31788cb.tar.gz
Properly implement Debug for AF_ALG structures
-rw-r--r--src/unix/notbsd/android/mod.rs4
-rw-r--r--src/unix/notbsd/linux/mod.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/unix/notbsd/android/mod.rs b/src/unix/notbsd/android/mod.rs
index 7578da0545..e8f7007b47 100644
--- a/src/unix/notbsd/android/mod.rs
+++ b/src/unix/notbsd/android/mod.rs
@@ -492,7 +492,7 @@ cfg_if! {
.field("salg_type", &self.salg_type)
.field("salg_feat", &self.salg_feat)
.field("salg_mask", &self.salg_mask)
-// .field("salg_name", &self.salg_name)
+ .field("salg_name", &&self.salg_name[..])
.finish()
}
}
@@ -529,7 +529,7 @@ cfg_if! {
impl ::fmt::Debug for af_alg_iv {
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
f.debug_struct("af_alg_iv")
- // .field("iv", self.as_slice())
+ .field("iv", &self.as_slice())
.finish()
}
}
diff --git a/src/unix/notbsd/linux/mod.rs b/src/unix/notbsd/linux/mod.rs
index 0ec83c1caa..91e99ef3ca 100644
--- a/src/unix/notbsd/linux/mod.rs
+++ b/src/unix/notbsd/linux/mod.rs
@@ -711,7 +711,7 @@ cfg_if! {
.field("salg_type", &self.salg_type)
.field("salg_feat", &self.salg_feat)
.field("salg_mask", &self.salg_mask)
-// .field("salg_name", &self.salg_name)
+ .field("salg_name", &&self.salg_name[..])
.finish()
}
}
@@ -748,7 +748,7 @@ cfg_if! {
impl ::fmt::Debug for af_alg_iv {
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
f.debug_struct("af_alg_iv")
- // .field("iv", self.as_slice())
+ .field("iv", &self.as_slice())
.finish()
}
}