aboutsummaryrefslogtreecommitdiff
path: root/bob/README.md
diff options
context:
space:
mode:
authorFederico Igne <git@federicoigne.com>2020-07-13 08:06:08 +0200
committerFederico Igne <git@federicoigne.com>2021-11-03 18:55:08 +0000
commit354a0ed1725ae5408e097164714599b6b1bb66c8 (patch)
treeed907fe660c2c7fae9521bdcb99658b1f3165f1c /bob/README.md
parent64cc39e6507a611366e1c3ddcf098b77c94a38db (diff)
downloadexercism-354a0ed1725ae5408e097164714599b6b1bb66c8.tar.gz
exercism-354a0ed1725ae5408e097164714599b6b1bb66c8.zip
[rust] Bob
Diffstat (limited to 'bob/README.md')
-rw-r--r--bob/README.md96
1 files changed, 96 insertions, 0 deletions
diff --git a/bob/README.md b/bob/README.md
new file mode 100644
index 0000000..dd84948
--- /dev/null
+++ b/bob/README.md
@@ -0,0 +1,96 @@
1# Bob
2
3Bob is a lackadaisical teenager. In conversation, his responses are very limited.
4
5Bob answers 'Sure.' if you ask him a question, such as "How are you?".
6
7He answers 'Whoa, chill out!' if you YELL AT HIM (in all capitals).
8
9He answers 'Calm down, I know what I'm doing!' if you yell a question at him.
10
11He says 'Fine. Be that way!' if you address him without actually saying
12anything.
13
14He answers 'Whatever.' to anything else.
15
16Bob's conversational partner is a purist when it comes to written communication and always follows normal rules regarding sentence punctuation in English.
17
18## Rust Installation
19
20Refer to the [exercism help page][help-page] for Rust installation and learning
21resources.
22
23## Writing the Code
24
25Execute the tests with:
26
27```bash
28$ cargo test
29```
30
31All but the first test have been ignored. After you get the first test to
32pass, open the tests source file which is located in the `tests` directory
33and remove the `#[ignore]` flag from the next test and get the tests to pass
34again. Each separate test is a function with `#[test]` flag above it.
35Continue, until you pass every test.
36
37If you wish to run all ignored tests without editing the tests source file, use:
38
39```bash
40$ cargo test -- --ignored
41```
42
43To run a specific test, for example `some_test`, you can use:
44
45```bash
46$ cargo test some_test
47```
48
49If the specific test is ignored use:
50
51```bash
52$ cargo test some_test -- --ignored
53```
54
55To learn more about Rust tests refer to the [online test documentation][rust-tests]
56
57Make sure to read the [Modules][modules] chapter if you
58haven't already, it will help you with organizing your files.
59
60## Further improvements
61
62After you have solved the exercise, please consider using the additional utilities, described in the [installation guide](https://exercism.io/tracks/rust/installation), to further refine your final solution.
63
64To format your solution, inside the solution directory use
65
66```bash
67cargo fmt
68```
69
70To see, if your solution contains some common ineffective use cases, inside the solution directory use
71
72```bash
73cargo clippy --all-targets
74```
75
76## Submitting the solution
77
78Generally you should submit all files in which you implemented your solution (`src/lib.rs` in most cases). If you are using any external crates, please consider submitting the `Cargo.toml` file. This will make the review process faster and clearer.
79
80## Feedback, Issues, Pull Requests
81
82The [exercism/rust](https://github.com/exercism/rust) repository on GitHub is the home for all of the Rust exercises. If you have feedback about an exercise, or want to help implement new exercises, head over there and create an issue. Members of the rust track team are happy to help!
83
84If you want to know more about Exercism, take a look at the [contribution guide](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/README.md).
85
86[help-page]: https://exercism.io/tracks/rust/learning
87[modules]: https://doc.rust-lang.org/book/ch07-02-defining-modules-to-control-scope-and-privacy.html
88[cargo]: https://doc.rust-lang.org/book/ch14-00-more-about-cargo.html
89[rust-tests]: https://doc.rust-lang.org/book/ch11-02-running-tests.html
90
91## Source
92
93Inspired by the 'Deaf Grandma' exercise in Chris Pine's Learn to Program tutorial. [http://pine.fm/LearnToProgram/?Chapter=06](http://pine.fm/LearnToProgram/?Chapter=06)
94
95## Submitting Incomplete Solutions
96It's possible to submit an incomplete solution so you can see how others have completed the exercise.