message: anchor for cache redundancy
diff: @@ -16,26 +16,32 @@ clone:
  git rev-parse HEAD
  image: "rust:latest"
  +# Anchor for default buildenv
  __buildenv: &buildenv
  image: "rust:latest"
  environment:
  CARGO_HOME: ".cargo"
  -kind: pipeline
  -name: cargo
  -
  -steps:
  -- name: restore-cache
  +# Anchor for cache plugin
  +__cache: &cache
  image: drillster/drone-volume-cache
  volumes:
  - name: cache
  path: /cache
  settings:
  - restore: true
  mount:
  - ./target
  - ./.cargo
  +kind: pipeline
  +name: cargo
  +
  +steps:
  +- name: restore-cache
  + <<: *cache
  + settings:
  + restore: true
  +
  - name: cargo-fmt
  <<: *buildenv
  commands:
  @@ -56,15 +62,9 @@ steps:
  - cargo test
  - name: rebuild-cache
  - image: drillster/drone-volume-cache
  - volumes:
  - - name: cache
  - path: /cache
  + <<: *cache
  settings:
  rebuild: true
  - mount:
  - - ./target
  - - ./.cargo
  when:
  branch:
  - master
  