pim-simulator auto-format
This commit is contained in:
@@ -77,13 +77,21 @@ pub fn json_to_instruction(
|
|||||||
|
|
||||||
macro_rules! json_str {
|
macro_rules! json_str {
|
||||||
($json:ident , $value:literal) => {
|
($json:ident , $value:literal) => {
|
||||||
$json.get($value).context(concat![$value, " field not present"])?.as_str().context(concat![$value, " field not str"])?
|
$json
|
||||||
|
.get($value)
|
||||||
|
.context(concat![$value, " field not present"])?
|
||||||
|
.as_str()
|
||||||
|
.context(concat![$value, " field not str"])?
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
macro_rules! json_i64 {
|
macro_rules! json_i64 {
|
||||||
($json:ident , $value:literal) => {
|
($json:ident , $value:literal) => {
|
||||||
$json.get($value).context(concat![$value, " field not present"])?.as_i64().context(concat![$value, " field not i64"])?
|
$json
|
||||||
|
.get($value)
|
||||||
|
.context(concat![$value, " field not present"])?
|
||||||
|
.as_i64()
|
||||||
|
.context(concat![$value, " field not i64"])?
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user