@@ -547,7 +547,7 @@ impl UpdateMessage<'static> {
547547 }
548548
549549 Some ( PathAttr :: Communities ) => {
550- if len % 4 == 0 {
550+ if len. is_multiple_of ( 4 ) {
551551 let mut opt_buf = vec ! [ 0 ; len. into( ) ] ;
552552 pattrs_reader. read_exact ( & mut opt_buf) . await ?;
553553 result. route_info . comm = opt_buf
@@ -561,7 +561,7 @@ impl UpdateMessage<'static> {
561561 }
562562
563563 Some ( PathAttr :: ExtCommunities ) => {
564- if len % 8 == 0 {
564+ if len. is_multiple_of ( 8 ) {
565565 let mut opt_buf = vec ! [ 0 ; len. into( ) ] ;
566566 pattrs_reader. read_exact ( & mut opt_buf) . await ?;
567567 result. route_info . ext_comm = opt_buf
@@ -575,7 +575,7 @@ impl UpdateMessage<'static> {
575575 }
576576
577577 Some ( PathAttr :: Ipv6ExtCommunities ) => {
578- if len % 20 == 0 {
578+ if len. is_multiple_of ( 20 ) {
579579 let mut opt_buf = vec ! [ 0 ; len. into( ) ] ;
580580 pattrs_reader. read_exact ( & mut opt_buf) . await ?;
581581 if let Some ( comm) = opt_buf
@@ -595,7 +595,7 @@ impl UpdateMessage<'static> {
595595 }
596596
597597 Some ( PathAttr :: LargeCommunities ) => {
598- if len % 12 == 0 {
598+ if len. is_multiple_of ( 12 ) {
599599 let mut opt_buf = vec ! [ 0 ; len. into( ) ] ;
600600 pattrs_reader. read_exact ( & mut opt_buf) . await ?;
601601 result. route_info . large_comm = opt_buf
0 commit comments