chore: set clippy check for const fn to warn (#15777)

This commit is contained in:
Federico Gimenez
2025-04-16 19:59:36 +02:00
committed by GitHub
parent 3bddd3cc8e
commit ddc101f863
115 changed files with 303 additions and 281 deletions

View File

@@ -362,7 +362,7 @@ impl ECIES {
}
/// Return the contained remote peer ID.
pub fn remote_id(&self) -> PeerId {
pub const fn remote_id(&self) -> PeerId {
self.remote_id.unwrap()
}
@@ -687,7 +687,7 @@ impl ECIES {
32
}
pub fn body_len(&self) -> usize {
pub const fn body_len(&self) -> usize {
let len = self.body_size.unwrap();
Self::align_16(len) + 16
}