refactor: const KafkaPartition::new()

Allows this fn to be called from const contexts (useful in test setups).
pull/24376/head
Dom Dwyer 2022-08-08 14:10:15 +02:00
parent 323788767d
commit d003fe0047
1 changed files with 1 additions and 1 deletions

View File

@ -185,7 +185,7 @@ pub struct KafkaPartition(i32);
#[allow(missing_docs)]
impl KafkaPartition {
pub fn new(v: i32) -> Self {
pub const fn new(v: i32) -> Self {
Self(v)
}
pub fn get(&self) -> i32 {