Skip to content

Commit 0e9caee

Browse files
authored
Merge pull request #133 from fjarri/zeroize-docs
Fix documentation build
2 parents 5d38a11 + effb209 commit 0e9caee

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

src/impl_const_default.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ impl<T: ConstDefault, U: ConstDefault> ConstDefault for GenericArrayImplOdd<T, U
2121
}
2222

2323
impl<T, U: ArrayLength<T>> ConstDefault for GenericArray<T, U>
24-
where U::ArrayType: ConstDefault,
24+
where
25+
U::ArrayType: ConstDefault,
2526
{
26-
const DEFAULT: Self = Self { data: ConstDefault::DEFAULT };
27+
const DEFAULT: Self = Self {
28+
data: ConstDefault::DEFAULT,
29+
};
2730
}

src/impl_zeroize.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
use {ArrayLength, GenericArray};
1+
use crate::{ArrayLength, GenericArray};
22

33
use zeroize::Zeroize;
44

5-
#[cfg_attr(docsrs, doc(cfg(feature = "zeroize")))]
65
impl<T: Zeroize, N: ArrayLength<T>> Zeroize for GenericArray<T, N> {
76
fn zeroize(&mut self) {
87
self.as_mut_slice().iter_mut().zeroize()
@@ -22,4 +21,4 @@ mod tests {
2221
assert_eq!(array[0], 0);
2322
assert_eq!(array[1], 0);
2423
}
25-
}
24+
}

src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
#![deny(missing_docs)]
6868
#![deny(meta_variable_misuse)]
6969
#![no_std]
70+
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
7071

7172
#[cfg(feature = "const-default")]
7273
extern crate const_default;

tests/arr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ fn const_context() {
3434
fn repeat_expression() {
3535
let ar = arr![u8; 0xc0; typenum::U4];
3636
assert_eq!(format!("{:x}", ar), "c0c0c0c0");
37-
}
37+
}

0 commit comments

Comments
 (0)