Skip to content

Commit 42f2fcb

Browse files
alambert-lanlbertschinger
authored andcommitted
xdr_codegen: remove redundant referencing
1 parent 0bd2ff5 commit 42f2fcb

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

xdr_codegen/src/codegen/zcopy_deser.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ impl ValidatedStruct {
389389

390390
buf.add_line("");
391391
buf.code_block(
392-
&format!("impl<'a> xdr_lib::Reader<'a> for {}Reader <'a>", &self.name),
392+
&format!("impl<'a> xdr_lib::Reader<'a> for {}Reader <'a>", self.name),
393393
|buf| {
394394
buf.code_block(
395395
"fn from_buf(buf: &'a [u8]) -> xdr_lib::Result<Self>",
@@ -489,7 +489,7 @@ impl ValidatedStruct {
489489

490490
buf.add_line(&format!(
491491
"Ok({})",
492-
&Self::offset_to_string(&overall_definition_size)
492+
Self::offset_to_string(&overall_definition_size)
493493
));
494494
} else {
495495
buf.add_line("Ok(0)");
@@ -535,7 +535,7 @@ impl ValidatedStruct {
535535

536536
buf.add_line(&format!(
537537
"let required = {};",
538-
&Self::offset_to_string(&overall_definition_size)
538+
Self::offset_to_string(&overall_definition_size)
539539
));
540540
buf.code_block("if required > self.buf.len()", |buf| {
541541
buf.add_line("return Err(xdr_lib::DeserializeError);");
@@ -771,7 +771,7 @@ impl ValidatedUnion {
771771
}
772772
),
773773
ValidatedUnionBody::Enum(body) => {
774-
format!("{}Ret{}", &self.name, body.get_explicit_lifetime(tab))
774+
format!("{}Ret{}", self.name, body.get_explicit_lifetime(tab))
775775
}
776776
}
777777
}

0 commit comments

Comments
 (0)