(contents: &str)
| 110 | } |
| 111 | |
| 112 | fn strip_tests(contents: &str) -> String { |
| 113 | // Windows checkouts may use CRLF; strip the test module on either platform. |
| 114 | let contents = contents.replace("\r\n", "\n"); |
| 115 | contents |
| 116 | .split("\n#[cfg(test)]\nmod tests") |
| 117 | .next() |
| 118 | .unwrap_or(&contents) |
| 119 | .to_string() |
| 120 | } |
| 121 | |
| 122 | fn token_present(source: &str, token: &str) -> bool { |
| 123 | source.contains(token) |
no test coverage detected