# Hands-on Rust: Beta 2 - Trimming Input (page 25)

**URL:** <https://forum.devtalk.com/t/hands-on-rust-beta-2-trimming-input-page-25/4420>\
**Category:** PragProg Customers\
**Tags:** book-hands-on-rust, errata\
**Created:** [26 November 2020 17:49 UTC](https://forum.devtalk.com/t/hands-on-rust-beta-2-trimming-input-page-25/4420 "2020-11-26T17:49:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![seanjseymour](https://forum.devtalk.com/user_avatar/forum.devtalk.com/seanjseymour/32/1312_2.png) [@seanjseymour](https://forum.devtalk.com/u/seanjseymour)\
**Post date:** [26 November 2020 17:49 UTC](https://forum.devtalk.com/t/hands-on-rust-beta-2-trimming-input-page-25/4420/1 "2020-11-26T17:49:33Z")

</div>

Hi, on page 25 in the Trimming Input section, after this text:

“You can see this by replacing your last println! call with the following:”

`println!("{:?}", name);`

I believe needs to be fixed to use the function like so:

`println!("{:?}", what_is_your_name());`

---

<div class="post-metadata">

**Author:** ![seanjseymour](https://forum.devtalk.com/user_avatar/forum.devtalk.com/seanjseymour/32/1312_2.png) [@seanjseymour](https://forum.devtalk.com/u/seanjseymour)\
**Post date:** [26 November 2020 20:54 UTC](https://forum.devtalk.com/t/hands-on-rust-beta-2-trimming-input-page-25/4420/2 "2020-11-26T20:54:17Z")

</div>

I see how this errata happened now, the book has the main function on p. 24 as:

```auto
fn main() {
println!("Hello, what's your name?");
println!("Hello, {}", what_is_your_name())
}

```

But the [online code example](http://media.pragprog.com/titles/hwrust/code/FirstStepsWithRust/treehouse_guestlist_problem/src/main.rs) throws the function output into a variable:

```auto
fn main() {
    println!("Hello, what's your name?");
    let name = what_is_your_name();
    println!("{:?}", name);
}

```

---

<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:** [27 November 2020 13:47 UTC](https://forum.devtalk.com/t/hands-on-rust-beta-2-trimming-input-page-25/4420/3 "2020-11-27T13:47:03Z")

</div>

Thank you! I’ve put this into the book’s issue tracker, it’ll be resolved for the next beta. Keeping the backing code (which auto-builds before each time I commit changes) synced with the book (which doesn’t) can be tricky sometimes. Thanks again - I’ll get that resolved.
