doc/wg/core/notes/core-notes-2022-12-16.md
Attendees:
debug!()debug!.
I would find that difficult to parse and understand as a user. The other part
is -- I think there's still an idea out there that we want to have a more
robust channel between a host and a device. By having two console
implementations we are not making the stand that we always want sequential
behavior to happen.debug!() is historical. We could add an alias
synchronous_write!.console_info, warning, and error.debug! could be rewritten as an integral part of the kernel. debug.rs has
things in it that are not okay for non-debug code.debug.rs has more than just the debug writer, it has
debug I/O and the panic handler.debug! look like UART, especially if that is the default one.MapCell is you can put something in the MapCell, take
it out, and take it out a second time, ending up with two references. This
pull request tracks that state, preventing you from taking something out a
second time. The tricky question is "what do we do with replace"? replace
should put something in the cell and return the old thing, but what if you
call it while you've taken something out? There's nothing to return, so it's
invalid, so this PR panics. You know I'm not the biggest fan of adding panics.replace and we should just get rid
of it.replace just return None?None. Return a Result<Option<>, Error>,
it could panic, or we could remove replace. Do we use replace anywhere?replace but we never do anything with it, so
we can just use put.replace, then lets get rid of it. If we really need it we can
resolve the API issue. Basically what Brad said, right?MapCell is not used in that many places, right?replace update self.occupied when
inserting a new item.MapCell at all until there's rigorous
unit tests.self.occupied.set problem, it
wasn't there before.self.put, which sets self.occupied.replace as we've managed
to put two more bugs into it.make program that doesn't program.