message: [examples/incrementer] Adjust to latest allocation changes
diff: @@ -11,11 +11,13 @@ use pdsl_core::{
  alloc::{
  AllocateUsing,
  Initialize,
  - MaybeUninitialized,
  },
  },
  };
  +// #[cfg(not(test))]
  +// use pdsl_core::println;
  +
  /// An incrementer smart contract.
  ///
  /// Can only increment and return its current value.
  @@ -47,13 +49,13 @@ impl Initialize for Incrementer {
  // Everything below this point can be generated by the upcoming eDSL.
  impl AllocateUsing for Incrementer {
  - unsafe fn allocate_using<A>(alloc: &mut A) -> MaybeUninitialized<Self>
  + unsafe fn allocate_using<A>(alloc: &mut A) -> Self
  where
  A: pdsl_core::storage::Allocator,
  {
  Self {
  - current: AllocateUsing::allocate_using(alloc).unwrap(),
  - }.into()
  + current: AllocateUsing::allocate_using(alloc),
  + }
  }
  }
  @@ -79,7 +81,7 @@ where
  ContractEnv::return_(&val.encode())
  }
  -fn instantiate() -> MaybeUninitialized<Incrementer> {
  +fn instantiate() -> Incrementer {
  unsafe {
  let mut alloc = alloc::BumpAlloc::from_raw_parts(ALLOC_KEY);
  Incrementer::allocate_using(&mut alloc)
  @@ -88,21 +90,23 @@ fn instantiate() -> MaybeUninitialized<Incrementer> {
  #[no_mangle]
  pub extern "C" fn deploy() {
  - instantiate().initialize(()).flush()
  + instantiate().initialize_into(()).flush()
  }
  #[no_mangle]
  pub extern "C" fn call() {
  let input = ContractEnv::input();
  let action = Action::decode(&mut &input[..]).unwrap();
  - let mut incrementer = instantiate().unwrap();
  + let mut incrementer = instantiate();
  match action {
  Action::Get => {
  let returned_val = &incrementer.get();
  + // println!("CALL: identified get() and returned {:?}", returned_val);
  ret(&returned_val)
  }
  Action::Inc(by) => {
  + // println!("CALL: identified inc({:?})", by);
  incrementer.inc(by);
  incrementer.flush();
  }
  