()
| 231 | .filter(|c| !c.is_control() || (c == &'\n')) |
| 232 | .take(len) |
| 233 | .collect::<String>(); |
| 234 | |
| 235 | FEEDBACK_NEWLINE_RE |
| 236 | .replace_all(&s_clean, " \n") |
| 237 | .to_string() |
| 238 | } |
| 239 | |
| 240 | pub fn github_token() -> Option<String> { |
| 241 | match env::var("GITHUB_TOKEN") { |
| 242 | Ok(token) => Some(token.trim().to_string()), |
| 243 | Err(e) => { |
| 244 | error!(error = ?e, "GITHUB_TOKEN has to be set for feedback"); |
nothing calls this directly
no outgoing calls
no test coverage detected