DioxusLabs/manganis

Compilation of manganis fails

opensource-inemar-net opened this issue · 2 comments

Problem

Compilation of manganis fails

Compiling manganis-common v0.2.4 (C:\aPerf\dioxus\m2\manganis\common)
error[E0597]: path_as_string does not live long enough
--> common\src\asset.rs:419:25
|
417 | let path = PathBuf::from({
| ------------- borrow later used by call
418 | let path_as_string = path.display().to_string();
| -------------- binding path_as_string declared here
419 | path_as_string
| ^^^^^^^^^^^^^^ borrowed value does not live long enough
...
422 | });
| - path_as_string dropped here while still borrowed

For more information about this error, try rustc --explain E0597.
error: could not compile manganis-common (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...

Steps To Reproduce

Steps to reproduce the behavior:

Expected behavior

compilation shall work

Environment:

  • Manganis main
  • Rust version: 1.79.0
  • OS info: windows

Questionnaire

  • I'm interested in fixing this myself but don't know where to start
  • [x ] I would like to fix and I have a solution
  • I don't have time to fix this right now, but maybe later

Fixed in #40

Github actions are also fixed which should prevent issues like this in the future