Skip to content

Commit 4e83034

Browse files
committed
Enforce clippy::redundant_clone, with an exception
1 parent e36bb3a commit 4e83034

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

tyrga-lib/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#![deny(unused_variables)]
1818
#![deny(clippy::inefficient_to_string)]
1919
#![deny(clippy::comparison_chain)]
20+
#![deny(clippy::redundant_clone)]
2021

2122
// make macros visible to later modules
2223
#[macro_use]

tyrga-lib/src/tenyr.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,10 @@ impl fmt::Display for Instruction {
662662

663663
#[cfg(test)]
664664
fn instruction_test_cases() -> Vec<(&'static str, Instruction)> {
665+
// for regularity, allow clones on every line in the tests below, even the ones that do not
666+
// need it
667+
#![allow(clippy::redundant_clone)]
668+
665669
use InstructionType::*;
666670
use MemoryOpType::*;
667671
use Opcode::*;

0 commit comments

Comments
 (0)