• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dandavison / delta / 6914707237

18 Nov 2023 03:11PM UTC coverage: 59.338% (+1.1%) from 58.209%
6914707237

push

github

web-flow
fixed typos (#1553)

2386 of 4021 relevant lines covered (59.34%)

1.9 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

36.36
/src/handlers/diff_header_misc.rs
1
use crate::delta::{DiffType, Source, State, StateMachine};
2

3
impl<'a> StateMachine<'a> {
4
    #[inline]
5
    fn test_diff_file_missing(&self) -> bool {
×
6
        self.source == Source::DiffUnified && self.line.starts_with("Only in ")
4✔
7
    }
8

9
    #[inline]
10
    fn test_diff_is_binary(&self) -> bool {
×
11
        self.line.starts_with("Binary files ")
×
12
    }
13

14
    pub fn handle_diff_header_misc_line(&mut self) -> std::io::Result<bool> {
4✔
15
        let is_binary: bool = self.test_diff_is_binary();
×
16
        let file_missing: bool = self.test_diff_file_missing();
×
17

18
        if !file_missing && !is_binary {
4✔
19
            return Ok(false);
4✔
20
        }
21

22
        if is_binary {
1✔
23
            match (self.minus_file.as_str(), self.plus_file.as_str()) {
×
24
                ("", "") => {
1✔
25
                    return self.handle_additional_cases(match self.state {
×
26
                        State::DiffHeader(_) => self.state.clone(),
×
27
                        _ => State::DiffHeader(DiffType::Unified),
×
28
                    });
29
                }
30
                ("/dev/null", _) => self.plus_file.push_str(" (binary file)"),
1✔
31
                (_, "/dev/null") => self.minus_file.push_str(" (binary file)"),
×
32
                (_, _) => (),
×
33
            };
34
            return Ok(true);
1✔
35
        }
36

37
        self.handle_additional_cases(match self.state {
×
38
            State::DiffHeader(_) => self.state.clone(),
×
39
            _ => State::DiffHeader(DiffType::Unified),
×
40
        })
41
    }
42
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc