Skip to content

Commit f07c46c

Browse files
authored
Merge pull request #173 from whitequark/master
Add missing unsafe qualifier on 1-bit enumerated fields
2 parents 441bd42 + bac9703 commit f07c46c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/generate.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1428,12 +1428,12 @@ pub fn fields(
14281428
if width == 1 {
14291429
proxy_items.push(quote! {
14301430
/// Sets the field bit
1431-
pub fn set_bit(self) -> &'a mut W {
1431+
pub #unsafety fn set_bit(self) -> &'a mut W {
14321432
self.bit(true)
14331433
}
14341434

14351435
/// Clears the field bit
1436-
pub fn clear_bit(self) -> &'a mut W {
1436+
pub #unsafety fn clear_bit(self) -> &'a mut W {
14371437
self.bit(false)
14381438
}
14391439
});

0 commit comments

Comments
 (0)