Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions content/learn/migration-guides/0.16-to-0.17.md
Original file line number Diff line number Diff line change
Expand Up @@ -2542,12 +2542,12 @@ To migrate tests, use:

```diff
- let entity = Entity::from_raw(1);
+ let entity = Entity::from_row_u32(1).unwrap();
+ let entity = Entity::from_raw_u32(1).unwrap();
```

If you are creating entities manually in production, don't do that!
Use `Entities::alloc` instead.
But if you must create one manually, either reuse a `EntityRow` you know to be valid by using `Entity::from_row` and `Entity::row`, or handle the error case of `None` returning from `Entity::from_row_u32(my_index)`.
But if you must create one manually, either reuse a `EntityRow` you know to be valid by using `Entity::from_row` and `Entity::row`, or handle the error case of `None` returning from `Entity::from_raw_u32(my_index)`.

#### Generation

Expand Down