page 111
This commit is contained in:
parent
f0c8a6b687
commit
66f2f1db23
|
@ -0,0 +1,30 @@
|
|||
-e { "configurations": { "launch": {
|
||||
"adapter": "CodeLLDB",
|
||||
"filetypes": [ "rust" ],
|
||||
"configuration": {
|
||||
"request": "launch",
|
||||
"program": "${workspaceRoot}/target/debug/rectangles"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-e { "configurations": { "launch": {
|
||||
"adapter": "CodeLLDB",
|
||||
"filetypes": [ "rust" ],
|
||||
"configuration": {
|
||||
"request": "launch",
|
||||
"program": "${workspaceRoot}/target/debug/rectangles"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-e { "configurations": { "launch": {
|
||||
"adapter": "CodeLLDB",
|
||||
"filetypes": [ "rust" ],
|
||||
"configuration": {
|
||||
"request": "launch",
|
||||
"program": "${workspaceRoot}/target/debug/HERE"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{ "configurations": { "launch": {
|
||||
"adapter": "CodeLLDB",
|
||||
"filetypes": [ "rust" ],
|
||||
"configuration": {
|
||||
"request": "launch",
|
||||
"program": "${workspaceRoot}/target/debug/HERE"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{ "configurations": { "launch": {
|
||||
"adapter": "CodeLLDB",
|
||||
"filetypes": [ "rust" ],
|
||||
"configuration": {
|
||||
"request": "launch",
|
||||
"program": "${workspaceRoot}/target/debug/coins"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "coins"
|
||||
version = "0.1.0"
|
|
@ -0,0 +1,8 @@
|
|||
[package]
|
||||
name = "coins"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
|
@ -0,0 +1,24 @@
|
|||
enum Coin {
|
||||
Penny,
|
||||
Nickel,
|
||||
Dime,
|
||||
Quarter,
|
||||
}
|
||||
|
||||
fn value_in_cents(coin: Coin) -> u8 {
|
||||
match coin {
|
||||
Coin::Penny => 1,
|
||||
Coin::Nickel => 5,
|
||||
Coin::Dime => 10,
|
||||
Coin::Quarter => 25,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
let v: u8 = value_in_cents(Coin::Dime);
|
||||
let s: String = v.to_string();
|
||||
println!("{}", s);
|
||||
|
||||
}
|
2
justfile
2
justfile
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env -S just --justfile
|
||||
|
||||
vimspector:
|
||||
echo -e "{ \"configurations\": { \"launch\": {\n \"adapter\": \"CodeLLDB\",\n \"filetypes\": [ \"rust\" ],\n \"configuration\": {\n \"request\": \"launch\",\n \"program\": \"\${workspaceRoot}/target/debug/rectangles\"\n }\n }\n }\n }" >> ./.vimspector.json
|
||||
echo -e "{ \"configurations\": { \"launch\": {\n \"adapter\": \"CodeLLDB\",\n \"filetypes\": [ \"rust\" ],\n \"configuration\": {\n \"request\": \"launch\",\n \"program\": \"\${workspaceRoot}/target/debug/HERE\"\n }\n }\n }\n }" >> ./.vimspector.json
|
||||
|
||||
|
||||
p:
|
||||
|
|
Loading…
Reference in New Issue