From 1b362cd1d5f09f0031b2ce1b161152422a397a67 Mon Sep 17 00:00:00 2001 From: Ayush Kumar Mishra <ayush.k.mishra@xcelenergy.com> Date: Tue, 21 Apr 2020 22:29:20 +0530 Subject: [PATCH] Minor refactoring --- src/librustc_lexer/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustc_lexer/src/lib.rs b/src/librustc_lexer/src/lib.rs index c7a803e3029..be85a34bd39 100644 --- a/src/librustc_lexer/src/lib.rs +++ b/src/librustc_lexer/src/lib.rs @@ -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()))