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/).
9
9
10
10
### Fixed
11
11
12
+ - Don't cast if field same type as register
12
13
- Parenthesizing ` #offset_calc ` to avoid clippy's warning of operator precedence
13
14
- Replace suffix in fields' name before converting to snake case when generating methods #563
14
15
Original file line number Diff line number Diff line change @@ -408,7 +408,7 @@ pub fn fields(
408
408
}
409
409
} else {
410
410
quote ! {
411
- self . bits #cast
411
+ self . bits
412
412
}
413
413
} ;
414
414
@@ -436,7 +436,7 @@ pub fn fields(
436
436
}
437
437
} else {
438
438
quote ! {
439
- self . bits #cast
439
+ self . bits
440
440
}
441
441
} ;
442
442
let name_sc_n = Ident :: new (
@@ -720,7 +720,7 @@ pub fn fields(
720
720
let op = if use_mask {
721
721
quote ! { self . w. bits = ( self . w. bits & !#hexmask) | ( value as #rty & #hexmask) ; }
722
722
} else {
723
- quote ! { self . w. bits = value as #rty ; }
723
+ quote ! { self . w. bits = value; }
724
724
} ;
725
725
726
726
quote ! {
You can’t perform that action at this time.
0 commit comments