Minor refactoring
This commit is contained in:
parent
365b3cc781
commit
1b362cd1d5
1 changed files with 1 additions and 1 deletions
|
|
@ -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()))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue