Skip to content

Commit

Permalink
Make to_* method on Copy type take self by value
Browse files Browse the repository at this point in the history
  • Loading branch information
faern committed Jun 4, 2024
1 parent a0b3073 commit 6254af9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nftnl/src/expr/verdict.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ pub enum RejectionType {
}

impl RejectionType {
fn to_raw(&self, family: ProtoFamily) -> u32 {
fn to_raw(self, family: ProtoFamily) -> u32 {
use libc::*;
let value = match *self {
let value = match self {
RejectionType::Icmp(..) => match family {
ProtoFamily::Bridge | ProtoFamily::Inet => NFT_REJECT_ICMPX_UNREACH,
_ => NFT_REJECT_ICMP_UNREACH,
Expand Down

0 comments on commit 6254af9

Please sign in to comment.