From 2c0efe68d8c8951b0b93cf63f5f24c1b3381aa38 Mon Sep 17 00:00:00 2001 From: conectado Date: Fri, 11 Jul 2025 21:11:19 -0300 Subject: [PATCH] fix pin writeup --- content/writeups/pin-is-neccesary.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/content/writeups/pin-is-neccesary.md b/content/writeups/pin-is-neccesary.md index fe09bcb..2a1ef42 100644 --- a/content/writeups/pin-is-neccesary.md +++ b/content/writeups/pin-is-neccesary.md @@ -8,7 +8,6 @@ draft = false So, let's say you have a clean and nice function like this. ```rs -use std::future::poll_fn; use std::pin::Pin; async fn foo() -> u32 { let mut x = 1; @@ -20,7 +19,7 @@ async fn foo() -> u32 { #[tokio::main] async fn main() { let mut x = foo(); - let mut a = unsafe { Pin::new_unchecked(&mut x) }; + let a = unsafe { Pin::new_unchecked(&mut x) }; println!("{}", a.await); }