(uri: &str)
| 368 | } |
| 369 | |
| 370 | fn translate_shortcut(uri: &str) -> Option<String> { |
| 371 | if uri.starts_with("gh:") { |
| 372 | Some(uri.replace("gh:", "https://github.com/")) |
| 373 | } else if uri.starts_with("gl:") { |
| 374 | Some(uri.replace("gl:", "https://gitlab.com/")) |
| 375 | } else if uri.starts_with("bb:") { |
| 376 | Some(uri.replace("bb:", "https://bitbucket.org/")) |
| 377 | } else { |
| 378 | None |
| 379 | } |
| 380 | } |
| 381 | |
| 382 | #[cfg(test)] |
| 383 | mod test { |
no outgoing calls
no test coverage detected