File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
rustworkx-core/src/shortest_path Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ where
133133 }
134134
135135 // Build path from predecessors
136- if path . is_some ( ) {
136+ if let Some ( path ) = & mut path {
137137 for node in graph. node_identifiers ( ) {
138138 if scores. get_item ( node) . is_some ( ) {
139139 let mut node_path = Vec :: < G :: NodeId > :: new ( ) ;
@@ -144,7 +144,7 @@ where
144144 node_path. push ( current_node) ;
145145 }
146146 node_path. reverse ( ) ;
147- path. as_mut ( ) . unwrap ( ) . insert ( node, node_path) ;
147+ path. insert ( node, node_path) ;
148148 }
149149 }
150150 }
Original file line number Diff line number Diff line change @@ -186,7 +186,7 @@ enum Value {
186186}
187187
188188impl Value {
189- fn serialize ( & self ) -> Option < Cow < str > > {
189+ fn serialize ( & self ) -> Option < Cow < ' _ , str > > {
190190 match self {
191191 Value :: Boolean ( val) => Some ( Cow :: from ( val. to_string ( ) ) ) ,
192192 Value :: Int ( val) => Some ( Cow :: from ( val. to_string ( ) ) ) ,
You can’t perform that action at this time.
0 commit comments