Skip to content

Commit 5debd90

Browse files
authored
Merge pull request #84 from ealmloff/clippy-lints
Add await clippy lints
2 parents b11c53f + 9b26e68 commit 5debd90

3 files changed

Lines changed: 24 additions & 0 deletions

File tree

Bare-Bones/clippy.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
await-holding-invalid-types = [
2+
"generational_box::GenerationalRef",
3+
{ path = "generational_box::GenerationalRef", reason = "Reads should not be held over an await point. This will cause any writes to fail while the await is pending since the read borrow is still active." },
4+
"generational_box::GenerationalRefMut",
5+
{ path = "generational_box::GenerationalRefMut", reason = "Write should not be held over an await point. This will cause any reads or writes to fail while the await is pending since the write borrow is still active." },
6+
"dioxus_signals::Write",
7+
{ path = "dioxus_signals::Write", reason = "Write should not be held over an await point. This will cause any reads or writes to fail while the await is pending since the write borrow is still active." },
8+
]

Jumpstart/clippy.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
await-holding-invalid-types = [
2+
"generational_box::GenerationalRef",
3+
{ path = "generational_box::GenerationalRef", reason = "Reads should not be held over an await point. This will cause any writes to fail while the await is pending since the read borrow is still active." },
4+
"generational_box::GenerationalRefMut",
5+
{ path = "generational_box::GenerationalRefMut", reason = "Write should not be held over an await point. This will cause any reads or writes to fail while the await is pending since the write borrow is still active." },
6+
"dioxus_signals::Write",
7+
{ path = "dioxus_signals::Write", reason = "Write should not be held over an await point. This will cause any reads or writes to fail while the await is pending since the write borrow is still active." },
8+
]

Workspace/clippy.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
await-holding-invalid-types = [
2+
"generational_box::GenerationalRef",
3+
{ path = "generational_box::GenerationalRef", reason = "Reads should not be held over an await point. This will cause any writes to fail while the await is pending since the read borrow is still active." },
4+
"generational_box::GenerationalRefMut",
5+
{ path = "generational_box::GenerationalRefMut", reason = "Write should not be held over an await point. This will cause any reads or writes to fail while the await is pending since the write borrow is still active." },
6+
"dioxus_signals::Write",
7+
{ path = "dioxus_signals::Write", reason = "Write should not be held over an await point. This will cause any reads or writes to fail while the await is pending since the write borrow is still active." },
8+
]

0 commit comments

Comments
 (0)