Fix include_str! compile error in examples/scenes. (#279)

I don't think CARGO_MANIFEST_DIR should ever end in "/", though I've
only checked on Linux and macOS.
This commit is contained in:
Jason Davies 2023-02-11 09:44:18 +00:00 committed by GitHub
parent 68022d2f4f
commit 5f59a2e818
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -243,7 +243,7 @@ fn included_tiger() -> impl FnMut(&mut SceneBuilder, &mut SceneParams) {
let (scene_frag, resolution) = cached_scene.get_or_insert_with(|| {
let contents = include_str!(concat!(
env!("CARGO_MANIFEST_DIR"),
"../../assets/Ghostscript_Tiger.svg"
"/../assets/Ghostscript_Tiger.svg"
));
let svg = usvg::Tree::from_str(&contents, &usvg::Options::default())
.expect("failed to parse svg file");