Apply review suggestion

Co-authored-by: Fridtjof Stoldt <xFrednet@gmail.com>
This commit is contained in:
Maja Kądziołka 2024-07-24 22:24:12 +02:00 committed by Maja Kądziołka
parent c6cc160ec6
commit e63061d75b
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View File

@ -336,7 +336,7 @@ fn main() {
{
fn takes_writer<T: std::io::Write>(_: T) {}
fn f(mut buffer: &mut Vec<u8>) {
fn issue_12856(mut buffer: &mut Vec<u8>) {
takes_writer(&mut buffer); // Don't lint, would make buffer unavailable later
buffer.extend(b"\n");
}

View File

@ -336,7 +336,7 @@ fn f(_: impl AsRef<str>) {}
{
fn takes_writer<T: std::io::Write>(_: T) {}
fn f(mut buffer: &mut Vec<u8>) {
fn issue_12856(mut buffer: &mut Vec<u8>) {
takes_writer(&mut buffer); // Don't lint, would make buffer unavailable later
buffer.extend(b"\n");
}