rust-bindgen icon indicating copy to clipboard operation
rust-bindgen copied to clipboard

Change `Bindings::write()` to take `impl Write` instead of `&mut dyn Write`

Open MarijnS95 opened this issue 2 weeks ago • 0 comments

Noticed immediately after #3317 was merged:

Dynamic dispatch is not (always) needed here, and this way an owned File can trivially be moved into the function again like before without forcing a mutable borrow. Noting that Write is even implemented on &File, which can now be more easily passed without having it under mut.

MarijnS95 avatar Dec 08 '25 13:12 MarijnS95