From 4f8b74d68382a298baa4bad2a699afe05a53bac2 Mon Sep 17 00:00:00 2001 From: Carter Anderson Date: Sun, 5 Nov 2023 12:11:24 -0800 Subject: [PATCH] 0.12 migration guide: AssetPath::new() -> AssetPath::from() (#815) --- content/learn/migration-guides/0.11-0.12/_index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/learn/migration-guides/0.11-0.12/_index.md b/content/learn/migration-guides/0.11-0.12/_index.md index a9b0482f15..a8130af5a4 100644 --- a/content/learn/migration-guides/0.11-0.12/_index.md +++ b/content/learn/migration-guides/0.11-0.12/_index.md @@ -196,13 +196,13 @@ Also, as you may have noticed, the set of events has changed. The most important AssetPath::new("logo.png", None); // 0.12 -AssetPath::new("logo.png"); +AssetPath::from("logo.png"); // 0.11 AssetPath::new("scene.gltf", Some("Mesh0")); // 0.12 -AssetPath::new("scene.gltf").with_label("Mesh0"); +AssetPath::from("scene.gltf").with_label("Mesh0"); ``` `AssetPath` now serializes as `AssetPath("some_path.extension#Label")` instead of as `AssetPath { path: "some_path.extension", label: Some("Label) }`