Alphare added a comment.

  @kevincox To re-iterate, I've taken over this series, so excuse any 
additional inaccuracies.

INLINE COMMENTS

> gracinet wrote in nodemap.rs:268
> About a method to output to a writer: for the time being, we're avoiding 
> doing I/O directly in Rust because most of it is shared with Python through 
> layers that perform various sanitizations, lock management etc. That's why 
> the simplest is to transfer bytes out.
> 
> Context note: the data structure (`Block`) is directly taken from the C 
> version, which is non-persistent, but I believe that these 64 bytes are just 
> some low-level programmer reflex. It's probably not a coincidence that IIRC 
> that's also the length of cache lines on most current CPUs.
> 
> Anyway, the point of all of this is to get on disk without padding, so yes, 
> we could implement our own non-padding by changing the definition of `Block` 
> to `[u8; 64]`. In the end, we are forced to trust what's on disk anyway.

@kevincox @durin42: I've changed the code to use the type-level `ManuallyDrop` 
instead of `mem::forget`, added the `transmute` to be extra paranoid and added 
a comment.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7796/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7796

To: gracinet, #hg-reviewers, kevincox, durin42
Cc: Alphare, marmoute, durin42, kevincox, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to