Skip to content

Commit 015e785

Browse files
author
daniel.eades
committed
avoid cloning when you can copy (clippy::cloned_instead_of_copied)
1 parent 8c28e51 commit 015e785

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graphql_client/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ impl Display for Error {
230230
.locations
231231
.as_ref()
232232
.and_then(|locations| locations.iter().next())
233-
.cloned()
233+
.copied()
234234
.unwrap_or_default();
235235

236236
write!(f, "{}:{}:{}: {}", path, loc.line, loc.column, self.message)

0 commit comments

Comments
 (0)