Skip to content

Commit e4c8f3d

Browse files
committed
Fix clippy
1 parent 3d52211 commit e4c8f3d

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/resultset.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -372,17 +372,21 @@ impl<'a, W: Write + 'a> RowWriter<'a, W> {
372372
if complete {
373373
if self.columns.is_empty() {
374374
// response to no column query is always an OK packet
375-
let mut resp = OkResponse::default();
376-
resp.info = extra_info.to_string();
375+
let resp = OkResponse {
376+
info: extra_info.to_string(),
377+
..Default::default()
378+
};
377379
self.result.as_mut().unwrap().last_end = Some(Finalizer::Ok(resp));
378380
} else if self
379381
.client_capabilities
380382
.contains(CapabilityFlags::CLIENT_DEPRECATE_EOF)
381383
{
382384
// response to no column query is always an OK packet
383-
let mut resp = OkResponse::default();
384-
resp.info = extra_info.to_string();
385-
resp.header = 0xfe;
385+
let resp = OkResponse {
386+
info: extra_info.to_string(),
387+
header: 0xfe,
388+
..Default::default()
389+
};
386390
self.result.as_mut().unwrap().last_end = Some(Finalizer::Ok(resp));
387391
} else {
388392
// we wrote out at least one row

src/writers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ where
119119
w.write_all(&[0x00, 0x00])?; // unused
120120

121121
if is_com_field_list {
122-
w.write(&[0xfb])?;
122+
w.write_all(&[0xfb])?;
123123
}
124124
w.end_packet()?;
125125
}

0 commit comments

Comments
 (0)