# Rust Brain Teasers: Type Conversion

**URL:** <https://forum.devtalk.com/t/rust-brain-teasers-type-conversion/23353>\
**Category:** PragProg Customers\
**Tags:** book-rust-brain-teasers, errata\
**Created:** [30 September 2021 16:17 UTC](https://forum.devtalk.com/t/rust-brain-teasers-type-conversion/23353 "2021-09-30T16:17:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrewhalle](https://forum.devtalk.com/letter_avatar_proxy/v4/letter/a/a88e4f/32.png) [@andrewhalle](https://forum.devtalk.com/u/andrewhalle)\
**Post date:** [30 September 2021 16:17 UTC](https://forum.devtalk.com/t/rust-brain-teasers-type-conversion/23353/1 "2021-09-30T16:17:38Z")

</div>

Title: Rust Brain Teasers: Type Conversion pg. 12 in the PDF

clippy does lints for both narrowing a type which may be lossy (clippy::cast-possible-truncation) and for casting a type which may be lossy in the future if the type is changed (clippy::cast-lossless). Neither of these is enabled by default, but both are on in clippy::pedantic

---

<div class="post-metadata">

**Author:** ![herbert](https://forum.devtalk.com/user_avatar/forum.devtalk.com/herbert/32/1233_2.png) [@herbert](https://forum.devtalk.com/u/herbert)\
**Post date:** [1 October 2021 20:32 UTC](https://forum.devtalk.com/t/rust-brain-teasers-type-conversion/23353/2 "2021-10-01T20:32:32Z")

</div>

Thank you! It’s definitely worth mentioning Pedantic Clippy, I’ve added this to the beta-2 list.

---

<div class="post-metadata">

**Author:** ![andrewhalle](https://forum.devtalk.com/letter_avatar_proxy/v4/letter/a/a88e4f/32.png) [@andrewhalle](https://forum.devtalk.com/u/andrewhalle)\
**Post date:** [1 October 2021 21:13 UTC](https://forum.devtalk.com/t/rust-brain-teasers-type-conversion/23353/3 "2021-10-01T21:13:04Z")

</div>

No problem, love the idea for the book!
