From 86fe8541c46b86ef9e5eaf9583d4639232019702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sun, 16 May 2021 11:26:31 +0100 Subject: [PATCH] Clarify constant --- src/io/error_correcting_encoder.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/io/error_correcting_encoder.rs b/src/io/error_correcting_encoder.rs index 89dd653..0faad51 100644 --- a/src/io/error_correcting_encoder.rs +++ b/src/io/error_correcting_encoder.rs @@ -4,7 +4,7 @@ use anyhow::*; use reed_solomon::Encoder; use reed_solomon::{Buffer, Decoder}; -const BLOCK_SIZE: usize = 255 - ECC_LENGTH; +const BLOCK_SIZE: usize = u8::MAX as usize - ECC_LENGTH; const ECC_LENGTH: usize = 8; // TODO: make the API streaming friendly