You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to include file using include_str! macro: #[shell(cmd = "python -c")] fn run_python(name: &str) -> Result<String, Box<std::error::Error>> { include_str("main.py") }
but getting an error on compilation: --> src/main.rs:3:1 | 3 | #[shell(cmd = "python -c")] help: message: Invalid input. Expected fn containing only string literal without any other statements
Is it possible to use include_str! macro for this or can I include file through other means?
The text was updated successfully, but these errors were encountered:
I'm trying to include file using include_str! macro:
#[shell(cmd = "python -c")] fn run_python(name: &str) -> Result<String, Box<std::error::Error>> { include_str("main.py") }
but getting an error on compilation:
--> src/main.rs:3:1 | 3 | #[shell(cmd = "python -c")] help: message: Invalid input. Expected fn containing only string literal without any other statements
Is it possible to use include_str! macro for this or can I include file through other means?
The text was updated successfully, but these errors were encountered: