Skip to content

Commit 2b4b41e

Browse files
committed
Fix documentation build
1 parent 1f50abb commit 2b4b41e

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

src/impl_const_default.rs

Lines changed: 5 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use {ArrayLength, GenericArray};
1+
use crate::{ArrayLength, GenericArray};
22

33
use zeroize::Zeroize;
44

@@ -22,4 +22,4 @@ mod tests {
2222
assert_eq!(array[0], 0);
2323
assert_eq!(array[1], 0);
2424
}
25-
}
25+
}

src/lib.rs

Lines changed: 1 addition & 0 deletions
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_cfg, doc_auto_cfg))]
7071

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

tests/arr.rs

Lines changed: 1 addition & 1 deletion
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)