-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove quotation marks from attribute bytes and bits
- Loading branch information
1 parent
b223767
commit fb097d9
Showing
20 changed files
with
103 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
use deku::prelude::*; | ||
|
||
#[derive(DekuRead)] | ||
#[deku(type = "u8", bits = "1", bytes = "2")] | ||
#[deku(type = "u8", bits = 1, bytes = 2)] | ||
enum Test1 {} | ||
|
||
#[derive(DekuRead)] | ||
#[deku(type = "u8")] | ||
enum Test2 { | ||
A(#[deku(bits = "1", bytes = "2")] u8), | ||
A(#[deku(bits = 1, bytes = 2)] u8), | ||
B { | ||
#[deku(bits = "3", bytes = "4")] | ||
#[deku(bits = 3, bytes = 4)] | ||
a: u8, | ||
}, | ||
} | ||
|
||
#[derive(DekuRead)] | ||
struct Test3 { | ||
#[deku(bits = "5", bytes = "6")] | ||
#[deku(bits = 5, bytes = 6)] | ||
a: u8, | ||
} | ||
|
||
#[derive(DekuRead)] | ||
struct Test4(#[deku(bits = "7", bytes = "8")] u8); | ||
struct Test4(#[deku(bits = 7, bytes = 8)] u8); | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
error: conflicting: both `bits` and `bytes` specified on enum | ||
--> $DIR/bits_bytes_conflict.rs:4:28 | ||
| | ||
4 | #[deku(type = "u8", bits = "1", bytes = "2")] | ||
| ^^^ | ||
4 | #[deku(type = "u8", bits = 1, bytes = 2)] | ||
| ^ | ||
|
||
error: conflicting: both `bits` and `bytes` specified on field | ||
--> $DIR/bits_bytes_conflict.rs:10:21 | ||
| | ||
10 | A(#[deku(bits = "1", bytes = "2")] u8), | ||
| ^^^ | ||
10 | A(#[deku(bits = 1, bytes = 2)] u8), | ||
| ^ | ||
|
||
error: conflicting: both `bits` and `bytes` specified on field | ||
--> $DIR/bits_bytes_conflict.rs:19:19 | ||
| | ||
19 | #[deku(bits = "5", bytes = "6")] | ||
| ^^^ | ||
19 | #[deku(bits = 5, bytes = 6)] | ||
| ^ | ||
|
||
error: conflicting: both `bits` and `bytes` specified on field | ||
--> $DIR/bits_bytes_conflict.rs:24:28 | ||
| | ||
24 | struct Test4(#[deku(bits = "7", bytes = "8")] u8); | ||
| ^^^ | ||
24 | struct Test4(#[deku(bits = 7, bytes = 8)] u8); | ||
| ^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.