This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 664
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(rome_formatter):
dbg_write
API compatibility with write
This PR ensures that the `buffer` argument of `dbg_write!` is compatible with the `buffer` argument of `write!` so that the two can be swapped without any changes to the debugged code. The current implementation hasn't been compatible because the `dbg_write!` macro called into `Inspect::new` that expected a `&mut Buffer` which requires the use of `&mut buffer` if an implementation uses a local `Buffer` variable. This PR changes the macro implementation to use `Buffer.inspect` instead that works for any mutable `Buffer`.
- Loading branch information
1 parent
89641b4
commit 6e1147f
Showing
3 changed files
with
22 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters