Skip to content

Commit ffb0456

Browse files
committed
TEST: Modernization of stdarch-{verify,test}
This commit fixes minor nits that caused 5 Clippy warnings.
1 parent 05ad0db commit ffb0456

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

crates/stdarch-test/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ pub fn assert(shim_addr: usize, fnname: &str, expected: &str) {
7171
//eprintln!(" function: {:?}", function);
7272

7373
let mut instrs = &function.instrs[..];
74-
while instrs.last().map_or(false, |s| s == "nop" || s == "int3") {
74+
while instrs.last().is_some_and(|s| s == "nop" || s == "int3") {
7575
instrs = &instrs[..instrs.len() - 1];
7676
}
7777

crates/stdarch-verify/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,7 @@ fn find_target_feature(attrs: &[syn::Attribute]) -> Option<syn::Lit> {
498498
attrs
499499
.iter()
500500
.flat_map(|a| {
501+
#[allow(clippy::collapsible_if)]
501502
if let syn::Meta::List(ref l) = a.meta {
502503
if l.path.is_ident("target_feature") {
503504
if let Ok(l) =
@@ -526,6 +527,7 @@ fn find_doc(attrs: &[syn::Attribute]) -> String {
526527
attrs
527528
.iter()
528529
.filter_map(|a| {
530+
#[allow(clippy::collapsible_if)]
529531
if let syn::Meta::NameValue(ref l) = a.meta {
530532
if l.path.is_ident("doc") {
531533
if let syn::Expr::Lit(syn::ExprLit {

0 commit comments

Comments
 (0)