Skip to content
Snippets Groups Projects
Commit c3b7108f authored by Henrik Tjäder's avatar Henrik Tjäder
Browse files

Added readme to 3a

parent cf7fdae8
Branches
No related tags found
No related merge requests found
......@@ -41,3 +41,40 @@ cargo run
## Description
Will take the string from CODED and output the decoded string into PLAIN
## Analysis
3a with the slice-borrowing will fail with
```
Running `target/debug/a3_decode`
Time to decode!
Decoded:
"But unto the wicked God saith, What hast thou to do to declare my statutes, or that thou shouldest take my covenant in thy mouth ?\u{0}"
```
while with branch 3b it detects it at compile time:
```
error[E0308]: mismatched types
--> src/main.rs:13:1
|
13 | / [ 0x015e7a47,
14 | | 0x2ef84ebb,
15 | | 0x177a8db4,
16 | | 0x1b722ff9,
... |
143 | | 0xc2e41061
144 | | ];
| |_________^ expected an array with a fixed size of 132 elements,
| found one with 131 elements
|
= note: expected type `[u32; 132]`
found type `[u32; 131]`
error: aborting due to previous error
error: Could not compile `a3_decode`.
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment