Command line tools: Implementing wc in Rust

  Рет қаралды 520

Code Maven

Code Maven

Күн бұрын

Пікірлер: 8
@galiKZ0
@galiKZ0 4 ай бұрын
To skip the first argument (which is always the name of the program itself), you could use the following : for filename in std::env::args().skip(1) { println!("{filename}"); }
@CodeMaven
@CodeMaven 4 ай бұрын
nice
@CodeMaven
@CodeMaven 4 ай бұрын
thanks, added to the plans
@rsalmei
@rsalmei 4 ай бұрын
Gabor, it doesn't make sense to `.collect().len()` an Iterator. Just `.count()` it.
@ThomasGuggler
@ThomasGuggler 4 ай бұрын
hi, where to find the code ?
@CodeMaven
@CodeMaven 4 ай бұрын
Link to code added to the page about the video rust.code-maven.com/implementing-wc-in-rust
@Maximus98245
@Maximus98245 3 ай бұрын
Great tutorial! Is there any way to load the file in chunks ? If I am reading a very large file, reading it into a string may not be a good idea. If we reading it in chunks, we have to be careful about the boundaries, it should not cut off Unicode character in half (first byte in chunk 1 and second byte in chunk 2 is bad). Thanks!
@CodeMaven
@CodeMaven 3 ай бұрын
That's a good extension to the exercise. Please open an issue on the GitHub repository with this idea so I'll be able to address it in the next video.
Rust code reading: The thousands crate
1:05:42
Code Maven
Рет қаралды 500
Accepting parameters on the command line using Rust clap
53:42
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН
Мясо вегана? 🧐 @Whatthefshow
01:01
История одного вокалиста
Рет қаралды 7 МЛН
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН
Implement Methods on Rust Structs 🦀
27:27
Trevor Sullivan
Рет қаралды 6 М.
6 Months of Testing C++ Build Systems: Here’s What You Need to Know
16:33
Parse Rust CLI Args With Clap 🦀 Rust Tutorial
54:03
Trevor Sullivan
Рет қаралды 13 М.
Testing python with pytest: The magic of fixtures
1:02:11
Code Maven
Рет қаралды 57
Let's Create a Compiler (Pt.1)
1:11:03
Pixeled
Рет қаралды 586 М.
Embedded Rust setup explained
23:03
The Rusty Bits
Рет қаралды 95 М.
How a Microcontroller starts
28:49
Artful Bytes
Рет қаралды 72 М.
Why Your Backend Shouldn't Serve Files
19:40
Boot dev
Рет қаралды 44 М.
Reading JSON files in Rust
1:07:42
Code Maven
Рет қаралды 218
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН