We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e1890c3 commit 96435c1Copy full SHA for 96435c1
README.md
@@ -23,6 +23,12 @@ $ cargo add asn1 --no-default-features
23
24
## Changelog
25
26
+### [Unreleased]
27
+
28
+#### Added
29
30
+- `BitString::new` is now `const fn`.
31
32
### [0.21.2]
33
34
#### Added
src/bit_string.rs
@@ -9,7 +9,7 @@ pub struct BitString<'a> {
9
}
10
11
impl<'a> BitString<'a> {
12
- pub fn new(data: &'a [u8], padding_bits: u8) -> Option<BitString<'a>> {
+ pub const fn new(data: &'a [u8], padding_bits: u8) -> Option<BitString<'a>> {
13
if padding_bits > 7 || (data.is_empty() && padding_bits != 0) {
14
return None;
15
0 commit comments