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}"); }
@CodeMaven4 ай бұрын
nice
@CodeMaven4 ай бұрын
thanks, added to the plans
@rsalmei4 ай бұрын
Gabor, it doesn't make sense to `.collect().len()` an Iterator. Just `.count()` it.
@ThomasGuggler4 ай бұрын
hi, where to find the code ?
@CodeMaven4 ай бұрын
Link to code added to the page about the video rust.code-maven.com/implementing-wc-in-rust
@Maximus982453 ай бұрын
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!
@CodeMaven3 ай бұрын
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.