Skip to content

Commit

Permalink
style: don't warn, rm unnecessary handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Devdutt Shenoi committed Oct 14, 2024
1 parent 6b7b98c commit 401c698
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions uplink/src/base/serializer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,8 @@ impl Storage {
// ## Panic
// When any packet other than a publish is deserialized.
pub fn read(&mut self, max_packet_size: usize) -> Option<Publish> {
if self.live_data_first && self.latest_data.is_some() {
return self.latest_data.take();
} else if self.latest_data.is_some() {
warn!("Latest data should be unoccupied if not using the live data first scheme");
if let Some(publish) = self.latest_data.take() {
return Some(publish);
}

// TODO(RT): This can fail when packet sizes > max_payload_size in config are written to disk.
Expand Down

0 comments on commit 401c698

Please sign in to comment.