Skip to content

Commit 0df6292

Browse files
committed
Resolve needless_borrow clippy lint
1 parent c4486d2 commit 0df6292

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

_src/impl-deserializer.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -438,14 +438,14 @@ impl<'de, 'a> de::Deserializer<'de> for &'a mut Deserializer<'de> {
438438
// Deserialization of compound types like sequences and maps happens by
439439
// passing the visitor an "Access" object that gives it the ability to
440440
// iterate through the data contained in the sequence.
441-
fn deserialize_seq<V>(mut self, visitor: V) -> Result<V::Value>
441+
fn deserialize_seq<V>(self, visitor: V) -> Result<V::Value>
442442
where
443443
V: Visitor<'de>,
444444
{
445445
// Parse the opening bracket of the sequence.
446446
if self.next_char()? == '[' {
447447
// Give the visitor access to each element of the sequence.
448-
let value = visitor.visit_seq(CommaSeparated::new(&mut self))?;
448+
let value = visitor.visit_seq(CommaSeparated::new(self))?;
449449
// Parse the closing bracket of the sequence.
450450
if self.next_char()? == ']' {
451451
Ok(value)
@@ -486,14 +486,14 @@ impl<'de, 'a> de::Deserializer<'de> for &'a mut Deserializer<'de> {
486486
// Much like `deserialize_seq` but calls the visitors `visit_map` method
487487
// with a `MapAccess` implementation, rather than the visitor's `visit_seq`
488488
// method with a `SeqAccess` implementation.
489-
fn deserialize_map<V>(mut self, visitor: V) -> Result<V::Value>
489+
fn deserialize_map<V>(self, visitor: V) -> Result<V::Value>
490490
where
491491
V: Visitor<'de>,
492492
{
493493
// Parse the opening brace of the map.
494494
if self.next_char()? == '{' {
495495
// Give the visitor access to each entry of the map.
496-
let value = visitor.visit_map(CommaSeparated::new(&mut self))?;
496+
let value = visitor.visit_map(CommaSeparated::new(self))?;
497497
// Parse the closing brace of the map.
498498
if self.next_char()? == '}' {
499499
Ok(value)

0 commit comments

Comments
 (0)