nftnl-rs icon indicating copy to clipboard operation
nftnl-rs copied to clipboard

removes expect statments from nft_set macro

Open cjmakes opened this issue 1 year ago • 0 comments

This commit removes expect statements from the nft_set macro which cause compile errors since the Result was remove in #21

small repro:

use nftnl::{nft_set, set::Set, Table, ProtoFamily};
use std::ffi::CString;

fn main() {
   let t = Table::new(&CString::new("test").unwrap(), nftnl::ProtoFamily::Ipv4);
   let s:Set<std::net::Ipv4Addr> = nft_set!(&CString::new("s1").unwrap(), 0, &t, ProtoFamily::Ipv4; [ &[1,1,1,1].into(), ]);
}


This change is Reviewable

cjmakes avatar Dec 03 '23 08:12 cjmakes