Rust Programming Exercises: Word Count

preview_player
Показать описание
In this video we create the simple word count program by working with the std::fs::File api in the rust standard library. We use std::env to get arguments, std::io::BufReader to read lines from each file and finally work with the std::fmt to format our output the way we want. It's a fairly simple exercises that should help get you more familiar with some of these apis.

Cheers! 🍻

🦀 #rust #exercises #leetcode #programming
Рекомендации по теме
Комментарии
Автор

There is allocation inside for loop call to_string() just to lookup map's entry. Though it's ok for such simple example, but could be potential performance issue.

vladimirbauer
Автор

I always get the creeps of long arrow functions, more than 2 lines and I need to make a function. I am also allergic to man { { { but that formatting was really nice!

CallousCoder
join shbcf.ru