Limits the range so that it doesn't overflow the end of a cluster.
(&self, address: u64, count: usize)
| 1359 | |
| 1360 | // Limits the range so that it doesn't overflow the end of a cluster. |
| 1361 | fn limit_range_cluster(&self, address: u64, count: usize) -> usize { |
| 1362 | let offset: u64 = self.raw_file.cluster_offset(address); |
| 1363 | let limit = self.raw_file.cluster_size() - offset; |
| 1364 | min(count as u64, limit) as usize |
| 1365 | } |
| 1366 | |
| 1367 | // Gets the maximum virtual size of this image. |
| 1368 | fn virtual_size(&self) -> u64 { |
no test coverage detected