Skip to content

Commit

Permalink
Allow indentation before fn main()
Browse files Browse the repository at this point in the history
  • Loading branch information
pheki committed Mar 25, 2021
1 parent 1dc66fb commit fc3d787
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 fc3d787

Please sign in to comment.