I first did this the hard way in https://github.com/a-b-street/osm2streets/tree/debug_sendsync, splitting out a separate Debugger type. But as I was opening that PR, I asked myself why couldn't all the debug_ methods just take &mut, and... turns out they can. Anywhere that's modifying streets and wants to record interesting debug stuff already has a mutable reference.
become Send. #179
I first did this the hard way in https://github.com/a-b-street/osm2streets/tree/debug_sendsync, splitting out a separate
Debugger
type. But as I was opening that PR, I asked myself why couldn't all thedebug_
methods just take&mut
, and... turns out they can. Anywhere that's modifying streets and wants to record interesting debug stuff already has a mutable reference.