skerkour / black-hat-rust

Applied offensive security with Rust - https://kerkour.com/black-hat-rust

Home Page:https://kerkour.com/black-hat-rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rust expression

sylvain101010 opened this issue · comments

Hi, I finished the first chapter. It was my first Rust program.
I had a lot of fun. I am looking forward to the rest of the book.
As a newbie to Rust, I was pleasantly surprised when vscode recognized my .rs file right off the bat and showed syntax highlighting. However, it showed compiler errors without - help: text. This threw me off for like 20 minutes. I didn't realize I had en extra semi-colon at the end of the final Ok(()); and this meant something was wrong. It showed the compiler error in the return value in the main signature. Slightly disappointed with vscode right now. (Apparently, you can either close with return Ok(()); or Ok(()) but not Ok(());.)

from https://www.reddit.com/r/rust/comments/lcow5j/black_hat_rust_im_writing_a_book_about_offensive/gmxjwmj

Make it more clear what Ok(()) means

Fixed in v2021.2