Skip to content

Commit

Permalink
0.12 migration guide: AssetPath::new() -> AssetPath::from() (#815)
Browse files Browse the repository at this point in the history
  • Loading branch information
cart authored Nov 5, 2023
1 parent e5161ac commit 4f8b74d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/learn/migration-guides/0.11-0.12/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) }`
Expand Down

0 comments on commit 4f8b74d

Please sign in to comment.