Skip to content

Commit 5e3042d

Browse files
committed
Remove double reference in Shell::print_json
`obj` is already `&T`.
1 parent 7918c7e commit 5e3042d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cargo/core/shell.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ impl Shell {
400400

401401
pub fn print_json<T: serde::ser::Serialize>(&mut self, obj: &T) -> CargoResult<()> {
402402
// Path may fail to serialize to JSON ...
403-
let encoded = serde_json::to_string(&obj)?;
403+
let encoded = serde_json::to_string(obj)?;
404404
// ... but don't fail due to a closed pipe.
405405
drop(writeln!(self.out(), "{}", encoded));
406406
Ok(())

0 commit comments

Comments
 (0)