Better macro ergonomics

This commit is contained in:
Nicolas Stalder
2021-09-22 23:30:24 +02:00
parent 3fda2fb7e8
commit e461162bc3
+16 -16
View File
@@ -90,12 +90,12 @@ macro_rules! ram_storage { (
erase_value=0xff,
read_size=1,
write_size=1,
cache_size_ty=consts::U32,
cache_size_ty=$crate::consts::U32,
block_size=128,
block_count=$bytes/128,
lookaheadwords_size_ty=consts::U1,
filename_max_plus_one_ty=consts::U256,
path_max_plus_one_ty=consts::U256,
lookaheadwords_size_ty=$crate::consts::U1,
filename_max_plus_one_ty=$crate::consts::U256,
path_max_plus_one_ty=$crate::consts::U256,
result=LfsResult,
);
};
@@ -107,12 +107,12 @@ macro_rules! ram_storage { (
erase_value=0xff,
read_size=32,
write_size=32,
cache_size_ty=consts::U32,
cache_size_ty=$crate::consts::U32,
block_size=128,
block_count=8,
lookaheadwords_size_ty=consts::U1,
filename_max_plus_one_ty=consts::U256,
path_max_plus_one_ty=consts::U256,
lookaheadwords_size_ty=$crate::consts::U1,
filename_max_plus_one_ty=$crate::consts::U256,
path_max_plus_one_ty=$crate::consts::U256,
result=Result,
);
};
@@ -124,12 +124,12 @@ macro_rules! ram_storage { (
erase_value=0xff,
read_size=32,
write_size=32,
cache_size_ty=consts::U32,
cache_size_ty=$crate::consts::U32,
block_size=256,
block_count=512,
lookaheadwords_size_ty=consts::U4,
filename_max_plus_one_ty=consts::U256,
path_max_plus_one_ty=consts::U256,
lookaheadwords_size_ty=$crate::consts::U4,
filename_max_plus_one_ty=$crate::consts::U256,
path_max_plus_one_ty=$crate::consts::U256,
result=Result,
);
};
@@ -218,12 +218,12 @@ macro_rules! const_ram_storage { (
erase_value=0xff,
read_size=16,
write_size=512,
cache_size_ty=consts::U512,
cache_size_ty=$crate::consts::U512,
block_size=512,
block_count=$bytes/512,
lookaheadwords_size_ty=consts::U1,
filename_max_plus_one_ty=consts::U256,
path_max_plus_one_ty=consts::U256,
lookaheadwords_size_ty=$crate::consts::U1,
filename_max_plus_one_ty=$crate::consts::U256,
path_max_plus_one_ty=$crate::consts::U256,
result=LfsResult,
);
};