Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
Fix new unused_mut detected by nightly-2023-04-30
Browse files Browse the repository at this point in the history
    warning: variable does not need to be mutable
       --> src/ser.rs:464:22
        |
    464 |     fn serialize_map(mut self, len: Option<usize>) -> Result<Self::SerializeMap> {
        |                      ----^^^^
        |                      |
        |                      help: remove this `mut`
        |
        = note: `#[warn(unused_mut)]` on by default
  • Loading branch information
dtolnay committed Apr 30, 2023
1 parent 8057fad commit 2037c7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ where
Ok(self)
}

fn serialize_map(mut self, len: Option<usize>) -> Result<Self::SerializeMap> {
fn serialize_map(self, len: Option<usize>) -> Result<Self::SerializeMap> {
if len == Some(1) {
self.state = if let State::FoundTag(_) = self.state {
self.emit_mapping_start()?;
Expand Down

0 comments on commit 2037c7e

Please sign in to comment.