Merge pull request #355 from Ziqi-Yang/ziqi-yang/fix-links

fix: add and fix solution links
This commit is contained in:
Sunface 2023-02-13 10:48:13 +08:00 committed by GitHub
commit 15a739c3b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
36 changed files with 54 additions and 24 deletions

View File

@ -98,4 +98,4 @@ fn main() {
} }
``` ```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice)(under the solutions path), but only use it when you need it > You can find the solutions [here](https://github.com/sunface/rust-by-practice/blob/master/solutions/basic-types/functions.md)(under the solutions path), but only use it when you need it

View File

@ -183,4 +183,4 @@ fn main() {
} }
``` ```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice)(under the solutions path), but only use it when you need it > You can find the solutions [here](https://github.com/sunface/rust-by-practice/blob/master/solutions/basic-types/numbers.md)(under the solutions path), but only use it when you need it

View File

@ -99,4 +99,4 @@ fn main() {
``` ```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice)(under the solutions path), but only use it when you need it > You can find the solutions [here](https://github.com/sunface/rust-by-practice/blob/master/solutions/compound-types/array.md)(under the solutions path), but only use it when you need it

View File

@ -208,4 +208,4 @@ fn main() {
} }
``` ```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice)(under the solutions path), but only use it when you need it > You can find the solutions [here](https://github.com/sunface/rust-by-practice/blob/master/solutions/compound-types/enum.md)(under the solutions path), but only use it when you need it

View File

@ -97,4 +97,4 @@ fn first_word(s: &str) -> &str {
} }
``` ```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice)(under the solutions path), but only use it when you need it > You can find the solutions [here](https://github.com/sunface/rust-by-practice/blob/master/solutions/compound-types/slice.md)(under the solutions path), but only use it when you need it

View File

@ -264,4 +264,4 @@ fn main() {
} }
``` ```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice)(under the solutions path), but only use it when you need it > You can find the solutions [here](https://github.com/sunface/rust-by-practice/blob/master/solutions/compound-types/string.md)(under the solutions path), but only use it when you need it

View File

@ -228,4 +228,4 @@ fn main() {
} }
``` ```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice)(under the solutions path), but only use it when you need it > You can find the solutions [here](https://github.com/sunface/rust-by-practice/blob/master/solutions/compound-types/struct.md)(under the solutions path), but only use it when you need it

View File

@ -86,4 +86,4 @@ fn sum_multiply(nums: (i32, i32)) -> (i32, i32) {
} }
``` ```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice)(under the solutions path), but only use it when you need it > You can find the solutions [here](https://github.com/sunface/rust-by-practice/blob/master/solutions/compound-types/tuple.md)(under the solutions path), but only use it when you need it

View File

@ -106,4 +106,4 @@ After this step, there should be two crates in package `hello-package`: **a bina
Yep, as you can see, the above package structure is very standard and is widely used in many Rust projects. Yep, as you can see, the above package structure is very standard and is widely used in many Rust projects.
> You can find the solutions [here](https://github.com/sunface/rust-by-practice) (under the solutions path), but only use it when you need it :) > You can find the solutions [here](https://github.com/sunface/rust-by-practice/blob/master/solutions/crate-module/crate.md) (under the solutions path), but only use it when you need it :)

View File

@ -192,4 +192,4 @@ fn main() {
} }
``` ```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice) (under the solutions path), but only use it when you need it :) > You can find the solutions [here](https://github.com/sunface/rust-by-practice/blob/master/solutions/crate-module/module.md) (under the solutions path), but only use it when you need it :)

View File

@ -66,4 +66,4 @@ pub mod a {
The full code of `hello-package` is [here](https://github.com/sunface/rust-by-practice/tree/master/practices/hello-package). The full code of `hello-package` is [here](https://github.com/sunface/rust-by-practice/tree/master/practices/hello-package).
> You can find the solutions [here](https://github.com/sunface/rust-by-practice) (under the solutions path), but only use it when you need it :) > You can find the solutions [here](https://github.com/sunface/rust-by-practice/blob/master/solutions/crate-module/use-pub.md) (under the solutions path), but only use it when you need it :)

View File

@ -26,4 +26,5 @@ impl test {
} }
fn main() {} fn main() {}
``` ```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice/blob/master/solutions/fight-compiler/borrowing.md)(under the solutions path), but only use it when you need it :)

View File

@ -151,3 +151,5 @@ fn main() {
} }
``` ```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice/blob/master/solutions/formatted-output/debug-display.md)(under the solutions path), but only use it when you need it :)

View File

@ -180,3 +180,5 @@ fn main() {
println!("Hello {{}}"); // => Hello {} println!("Hello {{}}"); // => Hello {}
} }
``` ```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice/blob/master/solutions/formatted-output/formatting.md)(under the solutions path), but only use it when you need it :)

View File

@ -36,3 +36,5 @@ fn main() {
__("Sunface!"); __("Sunface!");
} }
``` ```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice/blob/master/solutions/formatted-output/println.md)(under the solutions path), but only use it when you need it :)

View File

@ -432,4 +432,5 @@ fn call_with_different_values() {
assert_eq!(v2, 1); assert_eq!(v2, 1);
} }
``` ```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice/blob/master/solutions/functional-programing/closure.md)(under the solutions path), but only use it when you need it :)

View File

@ -350,3 +350,5 @@ fn main() {
); );
} }
``` ```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice/blob/master/solutions/functional-programing/iterator.md)(under the solutions path), but only use it when you need it :)

View File

@ -142,4 +142,4 @@ pub trait IsTrue {}
impl IsTrue for Assert<true> {} impl IsTrue for Assert<true> {}
``` ```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice)(under the solutions path), but only use it when you need it :) > You can find the solutions [here](https://github.com/sunface/rust-by-practice/blob/master/solutions/generics-traits/const-generics.md)(under the solutions path), but only use it when you need it :)

View File

@ -152,5 +152,5 @@ fn main() {
} }
``` ```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice)(under the solutions path), but only use it when you need it > You can find the solutions [here](https://github.com/sunface/rust-by-practice/blob/master/solutions/generics-traits/generics.md)(under the solutions path), but only use it when you need it

View File

@ -226,4 +226,4 @@ fn main() {
} }
``` ```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice)(under the solutions path), but only use it when you need it :) > You can find the solutions [here](https://github.com/sunface/rust-by-practice/blob/master/solutions/generics-traits/trait-object.md)(under the solutions path), but only use it when you need it :)

View File

@ -469,4 +469,4 @@ fn main() {
} }
``` ```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice)(under the solutions path), but only use it when you need it :) > You can find the solutions [here](https://github.com/sunface/rust-by-practice/blob/master/solutions/generics-traits/traits.md)(under the solutions path), but only use it when you need it :)

View File

@ -282,3 +282,5 @@ fn use_list(list: &List) {
println!("{}", list.manager.text); println!("{}", list.manager.text);
} }
``` ```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice/blob/master/solutions/lifetime/advance.md)(under the solutions path), but only use it when you need it :)

View File

@ -355,4 +355,5 @@ enum Either<'a> {
} }
fn main() {} fn main() {}
``` ```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice/blob/master/solutions/lifetime/basic.md)(under the solutions path), but only use it when you need it :)

View File

@ -195,3 +195,5 @@ fn print_g(t: &'static String) {
println!("{}", t); println!("{}", t);
} }
``` ```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice/blob/master/solutions/lifetime/static.md)(under the solutions path), but only use it when you need it :)

View File

@ -183,4 +183,4 @@ fn main() {
} }
``` ```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice)(under the solutions path), but only use it when you need it > You can find the solutions [here](https://github.com/sunface/rust-by-practice/blob/master/solutions/ownership/borrowing.md)(under the solutions path), but only use it when you need it

View File

@ -167,4 +167,4 @@ fn main() {
``` ```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice)(under the solutions path), but only use it when you need it > You can find the solutions [here](https://github.com/sunface/rust-by-practice/blob/master/solutions/ownership/ownership.md)(under the solutions path), but only use it when you need it

View File

@ -116,4 +116,4 @@ fn main() {
} }
``` ```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice)(under the solutions path), but only use it when you need it > You can find the solutions [here](https://github.com/sunface/rust-by-practice/blob/master/solutions/pattern-match/patterns.md)(under the solutions path), but only use it when you need it

View File

@ -109,3 +109,5 @@ If in your project you need to make the resulting binary as small as possible, y
panic = 'abort' panic = 'abort'
``` ```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice/blob/master/solutions/result-panic/panic.md)(under the solutions path), but only use it when you need it :)

View File

@ -209,4 +209,5 @@ fn main() -> Result<(), ParseIntError> {
println!("{}", number); println!("{}", number);
Ok(()) Ok(())
} }
``` ```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice/blob/master/solutions/result-panic/result.md)(under the solutions path), but only use it when you need it :)

View File

@ -48,4 +48,5 @@ fn call_with_different_values() {
assert_eq!(v2, 1); assert_eq!(v2, 1);
} }
``` ```
> 你可以在[这里](https://github.com/sunface/rust-by-practice/blob/master/solutions/functional-programing/closure.md)找到答案(在 solutions 路径下)

View File

@ -1,2 +1,4 @@
# Iterator # Iterator
> 你可以在[这里](https://github.com/sunface/rust-by-practice/blob/master/solutions/functional-programing/iterator.md)找到答案(在 solutions 路径下)

View File

@ -283,3 +283,5 @@ fn use_list(list: &List) {
println!("{}", list.manager.text); println!("{}", list.manager.text);
} }
``` ```
> 你可以在[这里](https://github.com/sunface/rust-by-practice/blob/master/solutions/lifetime/advance.md)找到答案(在 solutions 路径下)

View File

@ -335,3 +335,5 @@ enum Either<'a> {
fn main() {} fn main() {}
``` ```
> 你可以在[这里](https://github.com/sunface/rust-by-practice/blob/master/solutions/lifetime/basic.md)找到答案(在 solutions 路径下)

View File

@ -185,3 +185,5 @@ fn print_g(t: &'static String) {
println!("{}", t); println!("{}", t);
} }
``` ```
> 你可以在[这里](https://github.com/sunface/rust-by-practice/blob/master/solutions/lifetime/static.md)找到答案(在 solutions 路径下)

View File

@ -109,3 +109,5 @@ note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose bac
panic = 'abort' panic = 'abort'
``` ```
> 你可以在[这里](https://github.com/sunface/rust-by-practice/blob/master/solutions/result-panic/panic.md)找到答案(在 solutions 路径下)

View File

@ -207,4 +207,5 @@ fn main() -> Result<(), ParseIntError> {
println!("{}", number); println!("{}", number);
Ok(()) Ok(())
} }
``` ```
> 你可以在[这里](https://github.com/sunface/rust-by-practice/blob/master/solutions/result-panic/result.md)找到答案(在 solutions 路径下)