Skip to content

Commit

Permalink
Fix clippy warnings (#1346)
Browse files Browse the repository at this point in the history
Signed-off-by: Jiahao XU <[email protected]>
  • Loading branch information
NobodyXu authored Jan 6, 2025
1 parent 18307cf commit 251bd49
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions dev-tools/wasm32-wasip1-threads-test/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use rusqlite::{Connection, Result};

#[derive(Debug)]
struct Person {
#[allow(unused)]
pub id: i32,
pub name: String,
pub data: Option<Vec<u8>>,
Expand Down
20 changes: 10 additions & 10 deletions src/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ mod tests {
#[test]
fn codegen_type() {
let expected = RustcCodegenFlags {
code_model: Some("tiny".into()),
code_model: Some("tiny"),
..RustcCodegenFlags::default()
};
check("-Ccode-model=tiny", &expected);
Expand All @@ -327,7 +327,7 @@ mod tests {
check(
"-ccode-model=tiny\u{1f}-Ccode-model=small",
&RustcCodegenFlags {
code_model: Some("small".into()),
code_model: Some("small"),
..RustcCodegenFlags::default()
},
);
Expand All @@ -342,7 +342,7 @@ mod tests {
#[test]
fn three_valid_prefixes() {
let expected = RustcCodegenFlags {
lto: Some("true".into()),
lto: Some("true"),
..RustcCodegenFlags::default()
};
check("-L\u{1f}-L\u{1f}-Clto", &expected);
Expand Down Expand Up @@ -460,20 +460,20 @@ mod tests {
check(
&flags.join("\u{1f}"),
&RustcCodegenFlags {
code_model: Some("tiny".into()),
control_flow_guard: Some("yes".into()),
code_model: Some("tiny"),
control_flow_guard: Some("yes"),
embed_bitcode: Some(false),
force_frame_pointers: Some(true),
link_dead_code: Some(true),
lto: Some("false".into()),
lto: Some("false"),
no_redzone: Some(true),
no_vectorize_loops: true,
no_vectorize_slp: true,
profile_generate: Some("fooprofile".into()),
profile_use: Some("fooprofile".into()),
relocation_model: Some("pic".into()),
profile_generate: Some("fooprofile"),
profile_use: Some("fooprofile"),
relocation_model: Some("pic"),
soft_float: Some(true),
branch_protection: Some("bti,pac-ret,leaf".into()),
branch_protection: Some("bti,pac-ret,leaf"),
},
);
}
Expand Down

0 comments on commit 251bd49

Please sign in to comment.