@@ -89,9 +89,11 @@ impl MapInfo {
8989 let mut used_styles = OrderSet :: new ( ) ;
9090
9191 for ( map_info_type, css, force_connected) in order {
92- if let Some ( entries) = self . data . get ( & map_info_type)
93- && !entries. is_empty ( )
94- {
92+ if let Some ( entries) = self . data . get ( & map_info_type) {
93+ if entries. is_empty ( ) {
94+ continue ;
95+ }
96+
9597 let mut group = Group :: new ( ) . set ( "class" , get_class_names ( & css) ) ;
9698 for entry in entries {
9799 if let Some ( path) =
@@ -171,12 +173,12 @@ fn process_map_info_outline_entries(data: &[String]) -> Vec<MapInfoTypeDataEntry
171173
172174 for spec in parts {
173175 let mut coords = spec. splitn ( 3 , ',' ) ; // coordinates are "x,y,type"
174- if let ( Some ( x_str) , Some ( y_str) ) = ( coords. next ( ) , coords. next ( ) )
175- && let ( Ok ( x) , Ok ( y) ) = ( x_str. parse :: < f32 > ( ) , y_str. parse :: < f32 > ( ) )
176- {
177- let mut p = calc_point ( x , y ) ;
178- p . connected = coords . next ( ) . unwrap_or ( "1" ) . trim ( ) != "3-1-0" ; // lines to points of type "3-1-0" are not displayed
179- path_points . push ( p ) ;
176+ if let ( Some ( x_str) , Some ( y_str) ) = ( coords. next ( ) , coords. next ( ) ) {
177+ if let ( Ok ( x) , Ok ( y) ) = ( x_str. parse :: < f32 > ( ) , y_str. parse :: < f32 > ( ) ) {
178+ let mut p = calc_point ( x , y ) ;
179+ p . connected = coords . next ( ) . unwrap_or ( "1" ) . trim ( ) != "3-1-0" ; // lines to points of type "3-1-0" are not displayed
180+ path_points . push ( p ) ;
181+ }
180182 }
181183 }
182184
0 commit comments