How to refresh a file in Cargo repository?

        . . . 
   Compiling gfx_gl v0.5.0  
   Compiling rusttype v0.8.3
error: couldn't read  .cargo\registry\src\github.com-1ecc6299db9ec823\rand-0.6.5\src\seq\mod.rs: stream did not contain valid UTF-8
  --> .cargo\registry\src\github.com-1ecc6299db9ec823\rand-0.6.5\src\lib.rs:98:1
   |
98 | pub mod seq;
   | ^^^^^^^^^^^^

error: could not compile `rand` due to previous error
warning: build failed, waiting for other jobs to finish...
error: build failed
        . . .

In seq folder I have corrupted files
index.rs
mod.rs

Is it possible to change its ?

I am trying to repeat after a blogger (Sep 28, 2019) :
[Programming a Lava Lamp in Rust (ft. Piston) - YouTube](https://piston_window="0.93.0" rand="0.6.5")

[deps] 
piston_window="0.93.0"
rand="0.6.5"

You can delete that entire folder.

1 Like

That could be a warning sign that your hard drive is failing. It wouldn't hurt to back up important data now just in case.

Otherwise yeah, you can just delete it and cargo will re-download it all.

2 Likes

Compiling rand v0.6.5
Compiling winit v0.18.1
Compiling glutin v0.19.0
Compiling rayon-core v1.9.3
error[E0583]: file not found for module seq
--> .cargo\registry\src\github.com-1ecc6299db9ec823\rand-0.6.5\src\lib.rs:98:1
|
98 | pub mod seq;
| ^^^^^^^^^^^^
|
= help: to create the module seq, create file " .cargo\registry\src\github.com-1ecc6299db9ec823\rand-0.6.5\src\seq.rs" or ".cargo\registry\src\github.com-1ecc6299db9ec823\rand-0.6.5\src\seq\mod.rs"

Thank You for response
How to force to re-download ?
I cannot build now..

!!! I have deleted rand 065 folder, and now it is OK!

EDIT: Glad you got it sorted!

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.