1 #[allow(unused_assignments)]
2 #[warn(clippy::misrefactored_assign_op, clippy::assign_op_pattern)]
23 // check that we don't lint on op assign impls, because that's just the way to impl them
25 use std::ops::{Mul, MulAssign};
27 #[derive(Copy, Clone, Debug, PartialEq)]
30 impl Mul<i64> for Wrap {
33 fn mul(self, rhs: i64) -> Self {
38 impl MulAssign<i64> for Wrap {
39 fn mul_assign(&mut self, rhs: i64) {
46 let mut buf = Cow::Owned(String::from("bar"));
47 let cows = Cow::Borrowed("foo");
50 buf = buf + cows.clone();
52 // this should not as cow<str> Add is not commutative