refactor: const KafkaPartition::new()
Allows this fn to be called from const contexts (useful in test setups).pull/24376/head
parent
323788767d
commit
d003fe0047
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue