Extract the content of this hunk from a byte slice. # Panics Panics if the hunk range is out of bounds for the slice.
(&self, content: &'a [u8])
| 282 | /// |
| 283 | /// Panics if the hunk range is out of bounds for the slice. |
| 284 | pub fn extract<'a>(&self, content: &'a [u8]) -> &'a [u8] { |
| 285 | &content[self.start..self.end] |
| 286 | } |
| 287 | |
| 288 | /// Safely extract the content, returning None if out of bounds. |
| 289 | pub fn try_extract<'a>(&self, content: &'a [u8]) -> Option<&'a [u8]> { |
no outgoing calls
no test coverage detected