We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4483c29 commit 84cc6ceCopy full SHA for 84cc6ce
src/cargo/util/frontmatter.rs
@@ -112,7 +112,8 @@ impl<'s> ScriptSource<'s> {
112
}
113
114
115
-fn strip_shebang(input: &str) -> Option<usize> {
+/// Returns the index after the shebang line, if present
116
+pub fn strip_shebang(input: &str) -> Option<usize> {
117
// See rust-lang/rust's compiler/rustc_lexer/src/lib.rs's `strip_shebang`
118
// Shebang must start with `#!` literally, without any preceding whitespace.
119
// For simplicity we consider any line starting with `#!` a shebang,
0 commit comments