File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
99
1010### Fixed
1111
12+ - Don't cast if field same type as register
1213- Parenthesizing ` #offset_calc ` to avoid clippy's warning of operator precedence
1314- Replace suffix in fields' name before converting to snake case when generating methods #563
1415
Original file line number Diff line number Diff line change @@ -408,7 +408,7 @@ pub fn fields(
408408 }
409409 } else {
410410 quote ! {
411- self . bits #cast
411+ self . bits
412412 }
413413 } ;
414414
@@ -436,7 +436,7 @@ pub fn fields(
436436 }
437437 } else {
438438 quote ! {
439- self . bits #cast
439+ self . bits
440440 }
441441 } ;
442442 let name_sc_n = Ident :: new (
@@ -720,7 +720,7 @@ pub fn fields(
720720 let op = if use_mask {
721721 quote ! { self . w. bits = ( self . w. bits & !#hexmask) | ( value as #rty & #hexmask) ; }
722722 } else {
723- quote ! { self . w. bits = value as #rty ; }
723+ quote ! { self . w. bits = value; }
724724 } ;
725725
726726 quote ! {
You can’t perform that action at this time.
0 commit comments