Cleanup usage of feature "program" (#7712)

This commit is contained in:
Jack May
2020-01-08 13:49:35 -08:00
committed by GitHub
parent 57858b8015
commit 09cff5e4cc
8 changed files with 93 additions and 26 deletions

View File

@@ -117,10 +117,7 @@ pub fn limited_deserialize<T>(data: &[u8]) -> Result<T, InstructionError>
where
T: serde::de::DeserializeOwned,
{
#[cfg(not(feature = "program"))]
let limit = crate::packet::PACKET_DATA_SIZE as u64;
#[cfg(feature = "program")]
let limit = 1024;
bincode::config()
.limit(limit)
.deserialize(data)