@@ -25,7 +25,7 @@ pub fn render(p_original: &Peripheral, index: &Index, config: &Config) -> Result
2525 let mut path = None ;
2626 let dpath = p. derived_from . take ( ) ;
2727 if let Some ( dpath) = dpath {
28- path = derive_peripheral ( & mut p, & dpath, & index) ?;
28+ path = derive_peripheral ( & mut p, & dpath, index) ?;
2929 }
3030
3131 let name = util:: name_of ( & p, config. ignore_groups ) ;
@@ -162,7 +162,7 @@ pub fn render(p_original: &Peripheral, index: &Index, config: &Config) -> Result
162162
163163 // Build up an alternate erc list by expanding any derived registers/clusters
164164 // erc: *E*ither *R*egister or *C*luster
165- let mut ercs = p. registers . take ( ) . unwrap_or ( Vec :: new ( ) ) ;
165+ let mut ercs = p. registers . take ( ) . unwrap_or_default ( ) ;
166166
167167 // No `struct RegisterBlock` can be generated
168168 if ercs. is_empty ( ) {
@@ -922,7 +922,7 @@ fn cluster_block(
922922 let mut cpath = None ;
923923 let dpath = c. derived_from . take ( ) ;
924924 if let Some ( dpath) = dpath {
925- cpath = derive_cluster ( c, & dpath, & path, index) ?;
925+ cpath = derive_cluster ( c, & dpath, path, index) ?;
926926 }
927927 let cpath = cpath. unwrap_or_else ( || path. new_cluster ( & c. name ) ) ;
928928 mod_items. extend ( cluster_block ( c, & cpath, index, config) ?) ;
@@ -933,7 +933,7 @@ fn cluster_block(
933933 let mut rpath = None ;
934934 let dpath = reg. derived_from . take ( ) ;
935935 if let Some ( dpath) = dpath {
936- rpath = derive_register ( reg, & dpath, & path, index) ?;
936+ rpath = derive_register ( reg, & dpath, path, index) ?;
937937 }
938938 let rpath = rpath. unwrap_or_else ( || path. new_register ( & reg. name ) ) ;
939939 match register:: render ( reg, & rpath, index, config) {
0 commit comments