1. 29 Nov, 2019 3 commits
    • Raphaël Gomès's avatar
      7f284f681b9c
    • Raphaël Gomès's avatar
      Use pytest as dependency instead of py.test-3 · d689b5f80a7f
      Raphaël Gomès authored
      That was dependent on gracinet's context.
      Message amended for testing purposes.
      d689b5f80a7f
    • Georges Racinet's avatar
      A demo for in-place mutation of an object exposed to Python · c63571703c61
      Georges Racinet authored
      The problem is that we can't do it with data being a `RefCell`,
      that'd be moving out of borrowed content.
      
      The solution found wraps the content in an Option, and mutates that
      Option in place, using `take()` to replace it temporarily with `None`.
      
      I just hope this does not involve any data copy. Not sure how to prove
      that, maybe not implementing `Clone` is enough ?
      
      Under the hood, `Option::replace()` is implemented with `mem::replace`
      which doesn't indeed require any cloning.
      
      Maybe we can have even something more direct, without rewrapping, just
      using `mem::replace`, we'll see
      c63571703c61