You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
deser currently inherits the design for ignore from miniserde. It involves creating a mutable reference to some static Sink. Miri complains about this and it does sound dodgy. I definitely get miri failures from this when I use ignore and I was also able to reproduce the same issue in miniserde: dtolnay/miniserde#24
The solution for deser would be to embed a zero sized type Ignore directly in the SinkHandle like so:
Ignore can stay internal and SinkHandle gets a new method to create it (SinkHandle::null()) to replace SinkHandle::to(ignore()). This is also more convenient to use for a user.
Size of the enum should stay the same I think.
The text was updated successfully, but these errors were encountered:
That said, I'm not convinced this unsafe monkey business is actually needed in this case as keeping the Ignore directly in the SinkHandle is possible. At the very least I vastly prefer calling SinkHandle::null over having to make a SinkHandle manually and calling ignore().
deser currently inherits the design for
ignore
from miniserde. It involves creating a mutable reference to somestatic Sink
. Miri complains about this and it does sound dodgy. I definitely get miri failures from this when I useignore
and I was also able to reproduce the same issue in miniserde: dtolnay/miniserde#24The solution for deser would be to embed a zero sized type
Ignore
directly in theSinkHandle
like so:Ignore
can stay internal andSinkHandle
gets a new method to create it (SinkHandle::null()
) to replaceSinkHandle::to(ignore())
. This is also more convenient to use for a user.Size of the enum should stay the same I think.
The text was updated successfully, but these errors were encountered: