X Tutup
Skip to content

Commit 637e5ea

Browse files
committed
Use clippy suggestion
1 parent 445c4f7 commit 637e5ea

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/rust/iced-x86/src/info/tests/test_parser.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -246,15 +246,14 @@ impl IntoIter {
246246
continue;
247247
}
248248
let key;
249-
let value;
250-
if let Some(index) = kv.find('=') {
249+
let value = if let Some(index) = kv.find('=') {
251250
let s = kv.split_at(index);
252251
key = s.0;
253-
value = &s.1[1..];
252+
&s.1[1..]
254253
} else {
255254
key = kv;
256-
value = "";
257-
}
255+
""
256+
};
258257

259258
match *(*TO_INSTRUCTION_INFO_KEYS).get(key).unwrap_or(&u32::MAX) {
260259
InstructionInfoKeys::IS_PRIVILEGED => {

0 commit comments

Comments
 (0)
X Tutup