beginner/README.md: note that Dongle wiull always send vaid UTF-8, driveby fix whitespace errs

This commit is contained in:
Lotte Steenbrink 2020-06-17 14:33:19 +02:00
parent e8c5acfe9a
commit ca98eff912

View file

@ -369,6 +369,8 @@ The Dongle will respond differently depending on the length of the incoming pack
- On one-byte sized packets it will respond with the *direct* mapping from a *plaintext* letter -- the letter contained in the packet -- to the *ciphertext* letter.
- On packets of any other length the Dongle will respond with the string `correct` if it received the decrypted string, otherwise it will respond with the `incorrect` string.
The Dongle will always respond with packets that are valid UTF-8.
Our suggestion is to use a dictionary / map. `std::collections::HashMap` is not available in `no_std` code (without linking to a global allocator) but you can use one of the maps in the [`heapless`] crate. To make this crate available in your application get the latest version from [crates.io] and add it to the `beginner/apps/Cargo.toml` file, for example:
[`heapless`]: https://docs.rs/heapless