(&mut self)
| 247 | } |
| 248 | } |
| 249 | fn op(&mut self) -> FormatResult<CompactGraphOp> { |
| 250 | use CompactGraphOp::*; |
| 251 | let op = match get(&mut self.control)? { |
| 252 | 0 => FileAdd { |
| 253 | add_name: self.insertion(0)?, |
| 254 | add_inode: self.insertion(1)?, |
| 255 | contents: self.optional_insertion(2)?, |
| 256 | path: self.path()?, |
| 257 | encoding: self.aux()?, |
| 258 | }, |
| 259 | 1 => DirAdd { |
| 260 | add_name: self.insertion(0)?, |
| 261 | add_inode: self.insertion(1)?, |
| 262 | path: self.path()?, |
| 263 | }, |
| 264 | 2 => DirDel { |
| 265 | del: self.edges(0)?, |
| 266 | path: self.path()?, |
| 267 | }, |
| 268 | 3 => DirUndel { |
| 269 | undel: self.edges(2)?, |
| 270 | path: self.path()?, |
| 271 | }, |
| 272 | 4 => FileDel { |
| 273 | del: self.edges(0)?, |
| 274 | contents: self.optional_edges(1)?, |
| 275 | path: self.path()?, |
| 276 | encoding: self.aux()?, |
| 277 | }, |
| 278 | 5 => FileUndel { |
| 279 | undel: self.edges(2)?, |
| 280 | contents: self.optional_edges(3)?, |
| 281 | path: self.path()?, |
| 282 | encoding: self.aux()?, |
| 283 | }, |
| 284 | 6 => FileMove { |
| 285 | del: self.edges(4)?, |
| 286 | add: self.insertion(5)?, |
| 287 | path: self.path()?, |
| 288 | }, |
| 289 | 7 => { |
| 290 | let change = match get(&mut self.control)? { |
| 291 | 0 => CompactAtom::Insertion(self.insertion(3)?), |
| 292 | 1 => CompactAtom::EdgeUpdate(self.edges(5)?), |
| 293 | _ => return Err(invalid("unknown atom")), |
| 294 | }; |
| 295 | Edit { |
| 296 | change, |
| 297 | local: self.local(0)?, |
| 298 | encoding: self.aux()?, |
| 299 | } |
| 300 | } |
| 301 | 8 => Replacement { |
| 302 | change: self.edges(6)?, |
| 303 | replacement: self.insertion(4)?, |
| 304 | local: self.local(1)?, |
| 305 | encoding: self.aux()?, |
| 306 | }, |
no test coverage detected