updated cargo fmt

This commit is contained in:
Henry Schimke
2023-10-28 11:04:14 -05:00
parent 4c9ec95d00
commit 5ea03cc066
24 changed files with 122 additions and 64 deletions

View File

@@ -108,7 +108,11 @@ fn check(contents: &str, hints: &crate::EncodingHintDictionary) -> Result<i32> {
// Check for forced code set hint.
let mut forcedCodeSet = -1_i32;
if hints.contains_key(&EncodeHintType::FORCE_CODE_SET) {
let Some(EncodeHintValue::ForceCodeSet(codeSetHint)) = hints.get(&EncodeHintType::FORCE_CODE_SET) else { return Err(Exceptions::ILLEGAL_STATE) };
let Some(EncodeHintValue::ForceCodeSet(codeSetHint)) =
hints.get(&EncodeHintType::FORCE_CODE_SET)
else {
return Err(Exceptions::ILLEGAL_STATE);
};
match codeSetHint.as_str() {
"A" => forcedCodeSet = CODE_CODE_A as i32,
"B" => forcedCodeSet = CODE_CODE_B as i32,