Skip to content

Commit e6933d3

Browse files
committed
chore: removing trailing whitespace from tutorial/topics .md files
This was done using the following shell command: ```bash find ./content/tokio/ -name "*.md" | xargs -I {} sed -E -i 's/\s+$//' {} ``` Signed-off-by: AlfredWilmot <[email protected]>
1 parent 7fac166 commit e6933d3

File tree

9 files changed

+18
-18
lines changed

9 files changed

+18
-18
lines changed

content/tokio/topics/testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ be used as a mock:
142142

143143
```rust
144144
# use tokio::io::{AsyncBufReadExt, AsyncRead, AsyncWrite, AsyncWriteExt, BufReader};
145-
#
145+
#
146146
# async fn handle_connection<Reader, Writer>(
147147
# reader: Reader,
148148
# mut writer: Writer,

content/tokio/topics/tracing-next-steps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ To set up mini-redis, we'll first need to add a few dependencies. Update your
135135
# Implements the types defined in the Otel spec
136136
opentelemetry = "0.17.0"
137137
# Integration between the tracing crate and the opentelemetry crate
138-
tracing-opentelemetry = "0.17.2"
138+
tracing-opentelemetry = "0.17.2"
139139
# Allows you to export data to Jaeger
140140
opentelemetry-jaeger = "0.16.0"
141141
```

content/tokio/tutorial/async.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -582,10 +582,10 @@ impl TaskFuture {
582582
}
583583

584584
fn poll(&mut self, cx: &mut Context<'_>) {
585-
// Spurious wake-ups are allowed, even after a future has
586-
// returned `Ready`. However, polling a future which has
587-
// already returned `Ready` is *not* allowed. For this
588-
// reason we need to check that the future is still pending
585+
// Spurious wake-ups are allowed, even after a future has
586+
// returned `Ready`. However, polling a future which has
587+
// already returned `Ready` is *not* allowed. For this
588+
// reason we need to check that the future is still pending
589589
// before we call it. Failure to do so can lead to a panic.
590590
if self.poll.is_pending() {
591591
self.poll = self.future.as_mut().poll(cx);

content/tokio/tutorial/framing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ struct Connection {
6464

6565
impl Connection {
6666
/// Read a frame from the connection.
67-
///
67+
///
6868
/// Returns `None` if EOF is reached
6969
pub async fn read_frame(&mut self)
7070
-> Result<Option<Frame>>

content/tokio/tutorial/io.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ can use [`TcpStream::split`]. The task that processes the echo logic in the serv
281281
# fn dox(mut socket: TcpStream) {
282282
tokio::spawn(async move {
283283
let (mut rd, mut wr) = socket.split();
284-
284+
285285
if io::copy(&mut rd, &mut wr).await.is_err() {
286286
eprintln!("failed to copy");
287287
}

content/tokio/tutorial/select.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -554,15 +554,15 @@ async fn action() {
554554

555555
#[tokio::main]
556556
async fn main() {
557-
let (mut tx, mut rx) = tokio::sync::mpsc::channel(128);
557+
let (mut tx, mut rx) = tokio::sync::mpsc::channel(128);
558558
# tokio::spawn(async move {
559559
# let _ = tx.send(1).await;
560560
# let _ = tx.send(2).await;
561561
# });
562-
562+
563563
let operation = action();
564564
tokio::pin!(operation);
565-
565+
566566
loop {
567567
tokio::select! {
568568
_ = &mut operation => break,
@@ -657,17 +657,17 @@ async fn action(input: Option<i32>) -> Option<String> {
657657
#[tokio::main]
658658
async fn main() {
659659
let (mut tx, mut rx) = tokio::sync::mpsc::channel(128);
660-
660+
661661
let mut done = false;
662662
let operation = action(None);
663663
tokio::pin!(operation);
664-
664+
665665
tokio::spawn(async move {
666666
let _ = tx.send(1).await;
667667
let _ = tx.send(3).await;
668668
let _ = tx.send(2).await;
669669
});
670-
670+
671671
loop {
672672
tokio::select! {
673673
res = &mut operation, if !done => {

content/tokio/tutorial/shared-state.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ async fn process(socket: TcpStream, db: Db) {
133133
let mut db = db.lock().unwrap();
134134
db.insert(cmd.key().to_string(), cmd.value().clone());
135135
Frame::Simple("OK".to_string())
136-
}
136+
}
137137
Get(cmd) => {
138138
let db = db.lock().unwrap();
139139
if let Some(value) = db.get(cmd.key()) {

content/tokio/tutorial/spawning.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ error: future cannot be sent between threads safely
329329
|
330330
6 | tokio::spawn(async {
331331
| ^^^^^^^^^^^^ future created by async block is not `Send`
332-
|
332+
|
333333
::: [..]spawn.rs:127:21
334334
|
335335
127 | T: Future + Send + 'static,

content/tokio/tutorial/streams.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ pub trait Stream {
284284
type Item;
285285

286286
fn poll_next(
287-
self: Pin<&mut Self>,
287+
self: Pin<&mut Self>,
288288
cx: &mut Context<'_>
289289
) -> Poll<Option<Self::Item>>;
290290

@@ -324,7 +324,7 @@ struct Interval {
324324
# type Output = ();
325325
# fn poll(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<()> {
326326
# Poll::Pending
327-
# }
327+
# }
328328
# }
329329

330330
impl Interval {

0 commit comments

Comments
 (0)