Skip to content
Snippets Groups Projects
Commit 079256d2 authored by Jonas Johan Solsvik's avatar Jonas Johan Solsvik :video_game:
Browse files

fix rust= -> rust

parent f0e38a01
No related branches found
No related tags found
No related merge requests found
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
![](./cmd-help.png) ![](./cmd-help.png)
**Title:** DID CLI - **Title:** DID CLI
**Group:** 23, Identity Wallet, DID CLI - **Group:** 23, Identity Wallet, DID CLI
**Students**: Jonas Johan Solsvik - **Students**: Jonas Johan Solsvik
**Repo Bachelor Implementation**: https://github.com/DIN-Foundation/bcs-ntnu-2021 - **Repo Bachelor Implementation**: https://github.com/DIN-Foundation/bcs-ntnu-2021
**Repo Bachelor Thesis**: https://github.com/Arxcis/thesis-NTNU - **Repo Bachelor Thesis**: https://github.com/Arxcis/thesis-NTNU
# 1 Group discussion # 1 Group discussion
...@@ -57,7 +57,7 @@ It takes 3-4 seconds to build DID-CLI in a debug-build. DID-CLI is barely 1000 L ...@@ -57,7 +57,7 @@ It takes 3-4 seconds to build DID-CLI in a debug-build. DID-CLI is barely 1000 L
If a developer is used to a language like javascript, the Rust syntax may feel a bit verbose. This may scare developers away from Rust. If a developer is used to a language like javascript, the Rust syntax may feel a bit verbose. This may scare developers away from Rust.
*Example of verbose syntax to do simple thing:* *Example of verbose syntax in Rust to do simple thing:*
```rust ```rust
let mut entries: Vec<std::fs::DirEntry> = std::fs::read_dir(dids_path()) let mut entries: Vec<std::fs::DirEntry> = std::fs::read_dir(dids_path())
.unwrap() .unwrap()
...@@ -212,7 +212,7 @@ DID-CLI's init-function starts with creating a bunch of directories, if they don ...@@ -212,7 +212,7 @@ DID-CLI's init-function starts with creating a bunch of directories, if they don
Let's discuss a refactoring we did of the `read()`-function and its corresponding `read`-command. Let's discuss a refactoring we did of the `read()`-function and its corresponding `read`-command.
**read() before refactor** **read() before refactor**
```rust= ```rust
fn read(dcem: &str) -> Result<String, std::io::Error> { fn read(dcem: &str) -> Result<String, std::io::Error> {
use std::io::Write; use std::io::Write;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment