Skip to content

Commit bb013fe

Browse files
authored
Merge pull request #18 from pheki/main-whitespace
Allow indentation before fn main()
2 parents 1dc66fb + fc3d787 commit bb013fe

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/manifest.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ pub fn split_input(
4545
input_id: &OsString,
4646
) -> MainResult<(String, String)> {
4747
fn contains_main_method(line: &str) -> bool {
48+
let line = line.trim_start();
4849
line.starts_with("fn main()")
4950
|| line.starts_with("pub fn main()")
5051
|| line.starts_with("async fn main()")

0 commit comments

Comments
 (0)