File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 7
7
### Changed
8
8
- ` set_xxx(true_or_false) ` methods of the Registers and the Extended Capabilities are split into ` set_xxx() ` and ` clear_xxx() ` .
9
9
- ` CapabilityParameters1::max_primary_stream_array_size ` is renamed to ` CapabilityParameters1::maximum_primary_stream_array_size ` .
10
+ - Bit setter and clearer now return mutable references to ` Self ` .
10
11
11
12
## 0.6.0 - 2021-04-27
12
13
### Added
Original file line number Diff line number Diff line change @@ -31,17 +31,19 @@ macro_rules! bit_modifier {
31
31
#[ doc = "Sets the" ]
32
32
#[ doc = $name]
33
33
#[ doc = "bit." ]
34
- pub fn [ <set_ $method>] ( & mut self ) {
34
+ pub fn [ <set_ $method>] ( & mut self ) -> & mut Self {
35
35
use bit_field:: BitField ;
36
36
self . 0 . set_bit( $bit, true ) ;
37
+ self
37
38
}
38
39
39
40
#[ doc = "Clears the" ]
40
41
#[ doc = $name]
41
42
#[ doc = "bit." ]
42
- pub fn [ <clear_ $method>] ( & mut self ) {
43
+ pub fn [ <clear_ $method>] ( & mut self ) -> & mut Self {
43
44
use bit_field:: BitField ;
44
45
self . 0 . set_bit( $bit, false ) ;
46
+ self
45
47
}
46
48
}
47
49
} ;
@@ -73,9 +75,10 @@ macro_rules! rw1c_bit {
73
75
#[ doc = "Clears the" ]
74
76
#[ doc = $name]
75
77
#[ doc = "bit." ]
76
- pub fn [ <clear_ $method>] ( & mut self ) {
78
+ pub fn [ <clear_ $method>] ( & mut self ) -> & mut Self {
77
79
use bit_field:: BitField ;
78
80
self . 0 . set_bit( $bit, true ) ;
81
+ self
79
82
}
80
83
}
81
84
} ;
@@ -87,9 +90,10 @@ macro_rules! w1s_bit {
87
90
#[ doc = "Sets the" ]
88
91
#[ doc = $name]
89
92
#[ doc = "bit." ]
90
- pub fn [ <set_ $method>] ( & mut self ) {
93
+ pub fn [ <set_ $method>] ( & mut self ) -> & mut Self {
91
94
use bit_field:: BitField ;
92
95
self . 0 . set_bit( $bit, true ) ;
96
+ self
93
97
}
94
98
}
95
99
} ;
You can’t perform that action at this time.
0 commit comments