Minor refactoring

This commit is contained in:
Ayush Kumar Mishra 2020-04-21 22:29:20 +05:30
parent 365b3cc781
commit 1b362cd1d5

@ -237,7 +237,7 @@ pub enum Base {
pub fn strip_shebang(input: &str) -> Option<usize> {
debug_assert!(!input.is_empty());
let s: &str = &remove_whitespace(input);
if !s.starts_with("#!") || s.starts_with("#![") || s.starts_with("#! [") {
if !s.starts_with("#!") || s.starts_with("#![") {
return None;
}
Some(input.find('\n').unwrap_or(input.len()))