Skip to content

Commit

Permalink
Docs fixes (#4)
Browse files Browse the repository at this point in the history
* docs fixes

* lifetime/mut order fix

---------

Co-authored-by: Cliff L. Biffle <code@cliffle.com>
  • Loading branch information
helixbass and cbiffle authored Mar 2, 2024
1 parent 330f131 commit 9ce38e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/intro.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ async fn task_alice() -> Infallible {
async fn task_bob() -> Infallible {
loop {
sleep_for(Millis(1000).await;
sleep_for(Millis(1000)).await;
print(EVENT_COUNTER.load(Ordering::Relaxed));
}
Expand All @@ -374,7 +374,7 @@ buffer to be `static`:

[source]
----
fn get_the_buffer() -> &'static [u8; 1024] { <1>
fn get_the_buffer() -> &'static mut [u8; 1024] { <1>
static TAKEN: AtomicBool = AtomicBool::new(false); <2>
if TAKEN.swap(true, Ordering::SeqCst) { <3>
Expand Down

0 comments on commit 9ce38e3

Please sign in to comment.