Skip to content

Commit fcac056

Browse files
committed
Enable clippy check of all targets
1 parent cdeb0e2 commit fcac056

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- name: Install Rust
4242
run: rustup update stable && rustup default stable
4343
- name: cargo clippy
44-
run: cargo clippy
44+
run: cargo clippy --all --all-targets
4545

4646
rustfmt:
4747
name: rustfmt

tests/projection.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ impl<T1: Unpin, T2> Unpin for Foo<T1, T2> {} // Conditional Unpin impl
1616

1717
#[test]
1818
fn projection() {
19-
let foo = Foo {
19+
let x = Foo {
2020
field1: 1,
2121
field2: 2,
2222
};
23-
pin_mut!(foo);
23+
pin_mut!(x);
2424

25-
let x1: Pin<&mut i32> = foo.as_mut().field1();
25+
let x1: Pin<&mut i32> = x.as_mut().field1();
2626
assert_eq!(*x1, 1);
2727

28-
let x2: &mut i32 = foo.as_mut().field2();
28+
let x2: &mut i32 = x.as_mut().field2();
2929
assert_eq!(*x2, 2);
3030
}

tests/stack_pin.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ use pin_utils::pin_mut;
66
#[test]
77
fn stack_pin() {
88
struct Foo {}
9-
let foo = Foo {};
10-
pin_mut!(foo);
11-
let _: Pin<&mut Foo> = foo;
9+
let x = Foo {};
10+
pin_mut!(x);
11+
let _: Pin<&mut Foo> = x;
1212

13-
let bar = Foo {};
14-
let baz = Foo {};
15-
pin_mut!(bar, baz,);
16-
let _: Pin<&mut Foo> = bar;
17-
let _: Pin<&mut Foo> = baz;
13+
let y = Foo {};
14+
let z = Foo {};
15+
pin_mut!(y, z,);
16+
let _: Pin<&mut Foo> = y;
17+
let _: Pin<&mut Foo> = z;
1818
}

0 commit comments

Comments
 (0)