DEV Community

Cover image for Rustifying Chat: Create a Terminal UI Chat App in Rust

Rustifying Chat: Create a Terminal UI Chat App in Rust

Samba Diallo on August 15, 2019

The coding world is rich with new languages and frameworks, and one growing in popularity is Rust. You’ve probably heard about it, somewhere betwee...
Collapse
 
jeikabu profile image
jeikabu

Pretty cool. Didn't even know there was a crate for doing fancy curses-like GUI.

There's a more ergonomic way to wrangle error handling:

match result{
        Ok(file) => ...,
        Err(error) => 

It pulls the value out so you don't have to do so much if result.is_ok() { result.ok().unwrap().... code.

See RPL.

Collapse
 
sambajahlo profile image
Samba Diallo

Thanks for the tip! Usingmatch looks a lot cleaner, I'll make sure to use that :)