0

Now, The only way I used is cargo clean and then cargo build again.

2 Answers2

1

You can also delete the target directory that contains all the build artifacts.

Dan Forbes
  • 2,734
  • 3
  • 30
  • 60
0

There's two way to have a clean compile:

  1. Remove directory target with following command if you using Mac or Linux

    rm -rf target

  2. Cargo clean and build with following command:

    cargo clean && cargo build --release

Ayoung
  • 23
  • 4