From ddfeed217806653ee332e1a94fb5dfabc6a54f19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20F=C3=A4rnstrand?= Date: Thu, 18 Jul 2024 16:51:33 +0200 Subject: [PATCH] Use MAX associated constant instead of from std:: --- nftnl/examples/filter-ethernet.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nftnl/examples/filter-ethernet.rs b/nftnl/examples/filter-ethernet.rs index 8ba2384..fe275e0 100644 --- a/nftnl/examples/filter-ethernet.rs +++ b/nftnl/examples/filter-ethernet.rs @@ -74,7 +74,7 @@ fn main() -> io::Result<()> { // Load a pseudo-random 32 bit unsigned integer into the netfilter register. random_rule.add_expr(&nft_expr!(meta random)); // Check if the random integer is larger than `u32::MAX/2`, thus having 50% chance of success. - random_rule.add_expr(&nft_expr!(cmp > (::std::u32::MAX / 2).to_be())); + random_rule.add_expr(&nft_expr!(cmp > (u32::MAX / 2).to_be())); // Add a second counter. This will only be incremented for the packets passing the random check. random_rule.add_expr(&nft_expr!(counter));