aboutsummaryrefslogtreecommitdiff
path: root/gigasecond/README.md
diff options
context:
space:
mode:
authorFederico Igne <git@federicoigne.com>2020-12-26 17:48:38 +0000
committerFederico Igne <git@federicoigne.com>2021-11-03 18:55:08 +0000
commit02481656966b0a8dfc95cf3c22bcc049660ff7d4 (patch)
tree8e39798fcaf27931d91c2088423fd4e97adcfc2d /gigasecond/README.md
parent4e2052c4d792540c2f742b2c2a081b11117ed41d (diff)
downloadexercism-02481656966b0a8dfc95cf3c22bcc049660ff7d4.tar.gz
exercism-02481656966b0a8dfc95cf3c22bcc049660ff7d4.zip
Move Rust exercises in a subdirectory
Diffstat (limited to 'gigasecond/README.md')
-rw-r--r--gigasecond/README.md89
1 files changed, 0 insertions, 89 deletions
diff --git a/gigasecond/README.md b/gigasecond/README.md
deleted file mode 100644
index 9368f91..0000000
--- a/gigasecond/README.md
+++ /dev/null
@@ -1,89 +0,0 @@
1# Gigasecond
2
3Given a moment, determine the moment that would be after a gigasecond
4has passed.
5
6A gigasecond is 10^9 (1,000,000,000) seconds.
7
8If you're unsure what operations you can perform on `DateTime<Utc>` take a look at the [chrono crate](https://docs.rs/chrono) which is listed as a dependency in the `Cargo.toml` file for this exercise.
9
10
11## Rust Installation
12
13Refer to the [exercism help page][help-page] for Rust installation and learning
14resources.
15
16## Writing the Code
17
18Execute the tests with:
19
20```bash
21$ cargo test
22```
23
24All but the first test have been ignored. After you get the first test to
25pass, open the tests source file which is located in the `tests` directory
26and remove the `#[ignore]` flag from the next test and get the tests to pass
27again. Each separate test is a function with `#[test]` flag above it.
28Continue, until you pass every test.
29
30If you wish to run all ignored tests without editing the tests source file, use:
31
32```bash
33$ cargo test -- --ignored
34```
35
36To run a specific test, for example `some_test`, you can use:
37
38```bash
39$ cargo test some_test
40```
41
42If the specific test is ignored use:
43
44```bash
45$ cargo test some_test -- --ignored
46```
47
48To learn more about Rust tests refer to the [online test documentation][rust-tests]
49
50Make sure to read the [Modules][modules] chapter if you
51haven't already, it will help you with organizing your files.
52
53## Further improvements
54
55After 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.
56
57To format your solution, inside the solution directory use
58
59```bash
60cargo fmt
61```
62
63To see, if your solution contains some common ineffective use cases, inside the solution directory use
64
65```bash
66cargo clippy --all-targets
67```
68
69## Submitting the solution
70
71Generally 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.
72
73## Feedback, Issues, Pull Requests
74
75The [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!
76
77If 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).
78
79[help-page]: https://exercism.io/tracks/rust/learning
80[modules]: https://doc.rust-lang.org/book/ch07-02-defining-modules-to-control-scope-and-privacy.html
81[cargo]: https://doc.rust-lang.org/book/ch14-00-more-about-cargo.html
82[rust-tests]: https://doc.rust-lang.org/book/ch11-02-running-tests.html
83
84## Source
85
86Chapter 9 in Chris Pine's online Learn to Program tutorial. [http://pine.fm/LearnToProgram/?Chapter=09](http://pine.fm/LearnToProgram/?Chapter=09)
87
88## Submitting Incomplete Solutions
89It's possible to submit an incomplete solution so you can see how others have completed the exercise.