diff --git a/patterns/concurrency.md b/patterns/concurrency.md index cf32338..31e31c2 100644 --- a/patterns/concurrency.md +++ b/patterns/concurrency.md @@ -86,7 +86,7 @@ thread::spawn(move || { ### Source: -[library/std/src/sync/mutex.rs](https://github.com/rust-lang/rust/blob/f53b654a8882fd5fc036c4ca7a4ff41ce32497a6/library/std/src/sync/mutex.rs), [library/alloc/src/sync.rs](https://github.com/rust-lang/rust/blob/f53b654a8882fd5fc036c4ca7a4ff41ce32497a6/library/alloc/src/sync.rs) +[library/std/src/sync/poison/mutex.rs](https://github.com/rust-lang/rust/blob/f53b654a8882fd5fc036c4ca7a4ff41ce32497a6/library/std/src/sync/poison/mutex.rs), [library/alloc/src/sync.rs](https://github.com/rust-lang/rust/blob/f53b654a8882fd5fc036c4ca7a4ff41ce32497a6/library/alloc/src/sync.rs) ```rust use std::sync::{Arc, Mutex}; @@ -177,7 +177,7 @@ async fn good(data: Arc>>) { ### Source: -[library/std/src/sync/rwlock.rs](https://github.com/rust-lang/rust/blob/f53b654a8882fd5fc036c4ca7a4ff41ce32497a6/library/std/src/sync/rwlock.rs) +[library/std/src/sync/poison/rwlock.rs](https://github.com/rust-lang/rust/blob/f53b654a8882fd5fc036c4ca7a4ff41ce32497a6/library/std/src/sync/poison/rwlock.rs) ```rust use std::sync::RwLock; @@ -629,7 +629,7 @@ per-thread caches, buffers, and RNG state. ### Source: -[library/std/src/sync/mutex.rs](https://github.com/rust-lang/rust/blob/f53b654a8882fd5fc036c4ca7a4ff41ce32497a6/library/std/src/sync/mutex.rs) +[library/std/src/sync/poison/mutex.rs](https://github.com/rust-lang/rust/blob/f53b654a8882fd5fc036c4ca7a4ff41ce32497a6/library/std/src/sync/poison/mutex.rs) ```rust let mutex = Arc::new(Mutex::new(0)); diff --git a/patterns/error-handling.md b/patterns/error-handling.md index bf39ffc..1a80fd7 100644 --- a/patterns/error-handling.md +++ b/patterns/error-handling.md @@ -266,12 +266,12 @@ impl std::error::Error for ConnectError { // library/core/src/convert/mod.rs:557 impl From for CliError { fn from(error: io::Error) -> Self { - CliError::Io(error) + CliError::IoError(error) } } impl From for CliError { fn from(error: num::ParseIntError) -> Self { - CliError::Parse(error) + CliError::ParseError(error) } } ``` diff --git a/patterns/traits.md b/patterns/traits.md index cb2a9b6..f513040 100644 --- a/patterns/traits.md +++ b/patterns/traits.md @@ -15,7 +15,7 @@ impls, 895 Iterator impls, 269 Display impls, 226 Default impls. ### Source: -[library/core/src/iter/traits/iterator.rs#L76](https://github.com/rust-lang/rust/blob/f53b654a8882fd5fc036c4ca7a4ff41ce32497a6/library/core/src/iter/traits/iterator.rs#L76) +[library/core/src/iter/traits/iterator.rs#L42](https://github.com/rust-lang/rust/blob/f53b654a8882fd5fc036c4ca7a4ff41ce32497a6/library/core/src/iter/traits/iterator.rs#L42) ```rust // library/core/src/iter/traits/iterator.rs @@ -422,7 +422,7 @@ let first_10: Vec = Fibonacci { a: 0, b: 1 }.take(10).collect(); ### Source: -[library/core/src/ops/deref.rs#L60](https://github.com/rust-lang/rust/blob/f53b654a8882fd5fc036c4ca7a4ff41ce32497a6/library/core/src/ops/deref.rs#L60) +[library/core/src/ops/deref.rs#L139](https://github.com/rust-lang/rust/blob/f53b654a8882fd5fc036c4ca7a4ff41ce32497a6/library/core/src/ops/deref.rs#L139) ```rust pub trait Deref {