Skip to content

Commit

Permalink
Merge pull request #18 from pheki/main-whitespace
Browse files Browse the repository at this point in the history
Allow indentation before fn main()
  • Loading branch information
fornwall authored Mar 26, 2021
2 parents 1dc66fb + fc3d787 commit bb013fe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ pub fn split_input(
input_id: &OsString,
) -> MainResult<(String, String)> {
fn contains_main_method(line: &str) -> bool {
let line = line.trim_start();
line.starts_with("fn main()")
|| line.starts_with("pub fn main()")
|| line.starts_with("async fn main()")
Expand Down

0 comments on commit bb013fe

Please sign in to comment.