Skip to content

Commit 251bd49

Browse files
authored
Fix clippy warnings (#1346)
Signed-off-by: Jiahao XU <[email protected]>
1 parent 18307cf commit 251bd49

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

Diff for: dev-tools/wasm32-wasip1-threads-test/src/main.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use rusqlite::{Connection, Result};
22

33
#[derive(Debug)]
44
struct Person {
5+
#[allow(unused)]
56
pub id: i32,
67
pub name: String,
78
pub data: Option<Vec<u8>>,

Diff for: src/flags.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ mod tests {
313313
#[test]
314314
fn codegen_type() {
315315
let expected = RustcCodegenFlags {
316-
code_model: Some("tiny".into()),
316+
code_model: Some("tiny"),
317317
..RustcCodegenFlags::default()
318318
};
319319
check("-Ccode-model=tiny", &expected);
@@ -327,7 +327,7 @@ mod tests {
327327
check(
328328
"-ccode-model=tiny\u{1f}-Ccode-model=small",
329329
&RustcCodegenFlags {
330-
code_model: Some("small".into()),
330+
code_model: Some("small"),
331331
..RustcCodegenFlags::default()
332332
},
333333
);
@@ -342,7 +342,7 @@ mod tests {
342342
#[test]
343343
fn three_valid_prefixes() {
344344
let expected = RustcCodegenFlags {
345-
lto: Some("true".into()),
345+
lto: Some("true"),
346346
..RustcCodegenFlags::default()
347347
};
348348
check("-L\u{1f}-L\u{1f}-Clto", &expected);
@@ -460,20 +460,20 @@ mod tests {
460460
check(
461461
&flags.join("\u{1f}"),
462462
&RustcCodegenFlags {
463-
code_model: Some("tiny".into()),
464-
control_flow_guard: Some("yes".into()),
463+
code_model: Some("tiny"),
464+
control_flow_guard: Some("yes"),
465465
embed_bitcode: Some(false),
466466
force_frame_pointers: Some(true),
467467
link_dead_code: Some(true),
468-
lto: Some("false".into()),
468+
lto: Some("false"),
469469
no_redzone: Some(true),
470470
no_vectorize_loops: true,
471471
no_vectorize_slp: true,
472-
profile_generate: Some("fooprofile".into()),
473-
profile_use: Some("fooprofile".into()),
474-
relocation_model: Some("pic".into()),
472+
profile_generate: Some("fooprofile"),
473+
profile_use: Some("fooprofile"),
474+
relocation_model: Some("pic"),
475475
soft_float: Some(true),
476-
branch_protection: Some("bti,pac-ret,leaf".into()),
476+
branch_protection: Some("bti,pac-ret,leaf"),
477477
},
478478
);
479479
}

0 commit comments

Comments
 (0)