File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
7
7
8
8
## [ Unreleased]
9
9
10
+ - Add #[ must_use] to prevent hanging field writers
11
+
10
12
## [ v0.26.0] - 2022-10-07
11
13
12
14
- Use edition 2021
Original file line number Diff line number Diff line change @@ -929,6 +929,7 @@ pub fn fields(
929
929
w_impl_items. extend ( quote ! {
930
930
#[ doc = #doc]
931
931
#inline
932
+ #[ must_use]
932
933
pub unsafe fn #name_snake_case<const O : u8 >( & mut self ) -> #writer_ty<O > {
933
934
#writer_ty:: new( self )
934
935
}
@@ -947,6 +948,7 @@ pub fn fields(
947
948
w_impl_items. extend ( quote ! {
948
949
#[ doc = #doc]
949
950
#inline
951
+ #[ must_use]
950
952
pub fn #name_snake_case_n( & mut self ) -> #writer_ty<#sub_offset> {
951
953
#writer_ty:: new( self )
952
954
}
@@ -958,6 +960,7 @@ pub fn fields(
958
960
w_impl_items. extend ( quote ! {
959
961
#[ doc = #doc]
960
962
#inline
963
+ #[ must_use]
961
964
pub fn #name_snake_case( & mut self ) -> #writer_ty<#offset> {
962
965
#writer_ty:: new( self )
963
966
}
You can’t perform that action at this time.
0 commit comments