message: Format migrating.md
diff: @@ -23,36 +23,40 @@ major releases of `cosmwasm`. Note that you can also view the
  In order to use backtraces for debugging, run
  `RUST_BACKTRACE=1 cargo +nightly unit-test --features backtraces`.
  -- Rename the type `Extern` to `Deps`, and radically simplify the `init`/`handle`/`migrate`/`query` entrypoints.
  - Rather than `&mut Extern<S, A, Q>`, use `DepsMut`. And instead of `&Extern<S, A, Q>`, use `DepsRef`.
  - If you ever pass eg. `foo<A: Api>(api: A)` around, you must now use dynamic trait pointers: `foo(api: &dyn Api)`.
  - Here is the quick search-replace guide on how to fix `contract.rs`:
  +- Rename the type `Extern` to `Deps`, and radically simplify the
  + `init`/`handle`/`migrate`/`query` entrypoints. Rather than
  + `&mut Extern<S, A, Q>`, use `DepsMut`. And instead of `&Extern<S, A, Q>`, use
  + `DepsRef`. If you ever pass eg. `foo<A: Api>(api: A)` around, you must now use
  + dynamic trait pointers: `foo(api: &dyn Api)`. Here is the quick search-replace
  + guide on how to fix `contract.rs`:
  - *In production (non-test) code:*
  + _In production (non-test) code:_
  - * `<S: Storage, A: Api, Q: Querier>` => ``
  - * `&mut Extern<S, A, Q>` => `DepsMut`
  - * `&Extern<S, A, Q>` => `DepsRef`
  - * `&mut deps.storage` => `deps.storage` where passing into `state.rs` helpers
  - * `&deps.storage` => `deps.storage.as_readonly()` where passing into
  - `state.rs` helpers that expect `&dyn ReadonlyStorage`
  + - `<S: Storage, A: Api, Q: Querier>` => ``
  + - `&mut Extern<S, A, Q>` => `Deps`
  + - `&Extern<S, A, Q>` => `DepsRef`
  + - `&mut deps.storage` => `deps.storage` where passing into `state.rs` helpers
  + - `&deps.storage` => `deps.storage.as_readonly()` where passing into `state.rs`
  + helpers
  - On the top, remove `use cosmwasm_std::{Api, Extern, Querier, Storage}`. Add `use cosmwasm_std::{DepsMut, DepsRef}`.
  + On the top, remove `use cosmwasm_std::{Api, Extern, Querier, Storage}`. Add
  + `use cosmwasm_std::{Deps, DepsRef}`.
  - *In test code only:*
  + _In test code only:_
  - * `&mut deps,` => `deps.as_mut(),`
  - * `&deps,` => `deps.as_ref(),`
  + - `&mut deps,` => `deps.as_mut(),`
  + - `&deps,` => `deps.as_ref(),`
  - You may have to add `use cosmwasm_std::{Storage}` if the compile complains about the trait
  + You may have to add `use cosmwasm_std::{Storage}` if the compile complains
  + about the trait
  - *If you use cosmwasm-storage, in `state.rs`:*
  + _If you use cosmwasm-storage, in `state.rs`:_
  - * `<S: Storage>` => ``
  - * `<S: ReadonlyStorage>` => ``
  - * `<S, ` => `<`
  - * `&mut S` => `&mut dyn Storage`
  - * `&S` => `&dyn ReadonlyStorage`
  + - `<S: Storage>` => ``
  + - `<S: ReadonlyStorage>` => ``
  + - `<S,` => `<`
  + - `&mut S` => `&mut dyn Storage`
  + - `&S` => `&dyn ReadonlyStorage`
  ## 0.10 -> 0.11
  