1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-01-08 00:57:56 +02:00

from-and-into.md: mention losslessness and infallibility (#2281)

Fixes #2069.
This commit is contained in:
Frances Wingerter 2024-08-13 14:28:22 +00:00 committed by GitHub
parent 991bd8ceb7
commit 3b349d830c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,7 +4,8 @@ minutes: 5
# `From` and `Into`
Types implement [`From`][1] and [`Into`][2] to facilitate type conversions:
Types implement [`From`][1] and [`Into`][2] to facilitate type conversions.
Unlike `as`, these traits correspond to lossless, infallible conversions.
```rust,editable
fn main() {