From 67ed32cbf92c3e863a03b65fdcceea3369dc8ddc Mon Sep 17 00:00:00 2001 From: Tony Arcieri Date: Mon, 25 Nov 2019 08:36:30 -0800 Subject: [PATCH] msroots: Use clippy's suggested logic simplification Also the same one @str4d made originally, guess I should've listened! https://github.com/tarcieri/yubikey-piv.rs/pull/17#discussion_r349964456 --- src/msroots.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/msroots.rs b/src/msroots.rs index 868f3ad..f05ed70 100644 --- a/src/msroots.rs +++ b/src/msroots.rs @@ -79,8 +79,8 @@ impl MsRoots { ptr = ptr.add(1); } - if ((TAG_MSROOTS_MID != tag) && (TAG_MSROOTS_END != tag)) - || ((YKPIV_OBJ_MSROOTS5 == object_id) && (TAG_MSROOTS_END != tag)) + if (TAG_MSROOTS_MID != tag || YKPIV_OBJ_MSROOTS5 == object_id) + && (TAG_MSROOTS_END != tag) { // the current object doesn't contain a valid part of a msroots file