Skip to content

Commit 239298c

Browse files
committed
cosmetic: make publisher prefixes more clearly correlated with ASCII chars 'A' 'S' and 'T'
1 parent 32e8329 commit 239298c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/publisher.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ impl Publisher {
5050
) -> Result<(), KafkaError> {
5151
let temp_key;
5252
let (key, buf) = if wrap_messages {
53-
temp_key = self.copy_and_prepend(ev.pubkey.as_slice(), 65u8);
53+
temp_key = self.copy_and_prepend(ev.pubkey.as_slice(), b'A');
5454
(&temp_key, Self::encode_with_wrapper(Account(Box::new(ev))))
5555
} else {
5656
(&ev.pubkey, ev.encode_to_vec())
@@ -71,7 +71,7 @@ impl Publisher {
7171
) -> Result<(), KafkaError> {
7272
let temp_key;
7373
let (key, buf) = if wrap_messages {
74-
temp_key = self.copy_and_prepend(&ev.slot.to_le_bytes(), 83u8);
74+
temp_key = self.copy_and_prepend(&ev.slot.to_le_bytes(), b'S');
7575
(&temp_key, Self::encode_with_wrapper(Slot(Box::new(ev))))
7676
} else {
7777
temp_key = ev.slot.to_le_bytes().to_vec();
@@ -93,7 +93,7 @@ impl Publisher {
9393
) -> Result<(), KafkaError> {
9494
let temp_key;
9595
let (key, buf) = if wrap_messages {
96-
temp_key = self.copy_and_prepend(ev.signature.as_slice(), 84u8);
96+
temp_key = self.copy_and_prepend(ev.signature.as_slice(), b'T');
9797
(
9898
&temp_key,
9999
Self::encode_with_wrapper(Transaction(Box::new(ev))),

0 commit comments

Comments
 (0)