Skip to content

Commit

Permalink
Allow main function with arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
fenhl authored Oct 27, 2021
1 parent 32ac67f commit 5a0d918
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ pub fn split_input(
) -> 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()")
|| line.starts_with("pub async fn main()")
line.starts_with("fn main(")
|| line.starts_with("pub fn main(")
|| line.starts_with("async fn main(")
|| line.starts_with("pub async fn main(")
}

let template_buf;
Expand Down

0 comments on commit 5a0d918

Please sign in to comment.