Fix internal links (#143)

* Rename Readme to index to fix internal book links

Co-authored-by: simonsan <14062932+simonsan@users.noreply.github.com>
pull/90/head
Marco Ieni 3 years ago committed by GitHub
parent a46baf38b3
commit 344b5b8fbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2,7 +2,7 @@
- [Introduction](./intro.md)
- [Idioms](./idioms/README.md)
- [Idioms](./idioms/index.md)
- [Concatenating Strings with `format!`](./idioms/concat-format.md)
- [Constructor](./idioms/ctor.md)
- [The `Default` Trait](./idioms/default.md)
@ -16,7 +16,7 @@
- [Easy doc initialization](./idioms/rustdoc-init.md)
- [Temporary mutability](./idioms/temporary-mutability.md)
- [Design Patterns](./patterns/README.md)
- [Design Patterns](./patterns/index.md)
- [Builder](./patterns/builder.md)
- [Compose Structs](./patterns/compose-structs.md)
- [Fold](./patterns/fold.md)
@ -26,10 +26,10 @@
- [Contain unsafety in small modules](./patterns/unsafe-mods.md)
- [Visitor](./patterns/visitor.md)
- [Anti-patterns](./anti_patterns/README.md)
- [Anti-patterns](./anti_patterns/index.md)
- [`#[deny(warnings)]`](./anti_patterns/deny-warnings.md)
- [Deref Polymorphism](./anti_patterns/deref.md)
- [Functional Programming](./functional/README.md)
- [Functional Programming](./functional/index.md)
- [Additional Resources](./additional_resources.md)

@ -7,13 +7,13 @@ When developing programs, we have to solve many problems. A program can be viewe
There are many problems that share the same form. Due to the fact that Rust is not object-oriented design patterns vary with respect to other object-oriented programming languages. While the details are different, since they have the same form they can be solved using the same fundamental methods.
[Design patterns](https://rust-unofficial.github.io/patterns/patterns/index.html) are methods to solve common problems when writing software.
[Design patterns](./patterns/index.md) are methods to solve common problems when writing software.
[Anti-patterns](https://rust-unofficial.github.io/patterns/anti_patterns/index.html) are methods to solve these same common problems.
[Anti-patterns](./anti_patterns/index.md) are methods to solve these same common problems.
However, while design patterns give us benefits, anti-patterns create more problems.
[Idioms](https://rust-unofficial.github.io/patterns/idioms/index.html) are guidelines to follow when coding. They are social norms of the community.
[Idioms](./idioms/index.md) are guidelines to follow when coding. They are social norms of the community.
You can break them, but if you do you should have a good reason for it.
TODO: Mention why Rust is a bit special - functional elements, type system, borrow checker

@ -1,15 +0,0 @@
# Refactoring
Refactoring is very important in relation to these topics. Just as important as the other topics covered here, is how to take good code and turn it into great code.
We can use [design patterns](patterns/README.md) to DRY up code and generalize abstractions. We must avoid [anti-patterns](anti_patterns/README.md) while we do this. While they may be tempting to employ, their costs outweigh their benefits.
> Shortcuts make for long days.
We can also use [idioms](idioms/README.md) to structure our code in a way that is understandable.
## Tests
Tests are of vital importance during refactoring.
## Small changes

@ -0,0 +1,15 @@
# Refactoring
Refactoring is very important in relation to these topics. Just as important as the other topics covered here, is how to take good code and turn it into great code.
We can use [design patterns](patterns/index.md) to DRY up code and generalize abstractions. We must avoid [anti-patterns](anti_patterns/index.md) while we do this. While they may be tempting to employ, their costs outweigh their benefits.
> Shortcuts make for long days.
We can also use [idioms](idioms/index.md) to structure our code in a way that is understandable.
## Tests
Tests are of vital importance during refactoring.
## Small changes
Loading…
Cancel
Save