(
&self,
s1: &Option<Vec<u8>>,
s2: &Option<Vec<u8>>,
)
| 429 | } |
| 430 | |
| 431 | fn diff_optional_bytes( |
| 432 | &self, |
| 433 | s1: &Option<Vec<u8>>, |
| 434 | s2: &Option<Vec<u8>>, |
| 435 | ) -> Option<StringDiff> { |
| 436 | match (s1, s2) { |
| 437 | (Some(a), Some(b)) => self.diff_bytes(a, b), |
| 438 | (None, None) => None, |
| 439 | (Some(a), None) => Some(StringDiff { |
| 440 | old: a.clone(), |
| 441 | new: Vec::new(), |
| 442 | }), |
| 443 | (None, Some(b)) => Some(StringDiff { |
| 444 | old: Vec::new(), |
| 445 | new: b.clone(), |
| 446 | }), |
| 447 | } |
| 448 | } |
| 449 | |
| 450 | fn diff_file_contents(&self, content1: &[u8], content2: &[u8]) -> TextDiff { |
| 451 | // Check if content is binary |
no test coverage detected