Skip to content

fix some typos #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ch01/a-assembly-dereference/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//! ## FIX ISSUE #11:
//! See:https://github.com/PacktPublishing/Asynchronous-Programming-in-Rust/issues/11
//! The book didn't make it clear that this example will only work on `x86-64` architecture,
//! so users on newer M-series macs (which uses the ARM64 instruciton set), will get a
//! so users on newer M-series macs (which uses the ARM64 instruction set), will get a
//! compilation error. This is solved by conditionally compiling a version that works
//! with the ARM64 instruction set.

Expand Down
2 changes: 1 addition & 1 deletion ch03/a-raw-syscall/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ fn syscall(message: String) {
}

// ----------------------------------------------------------------------------
// macOS raw syscall when running newer M familiy CPU (ARM 64 architecture)
// macOS raw syscall when running newer M family CPU (ARM 64 architecture)
// ----------------------------------------------------------------------------

#[cfg(all(target_os = "macos", target_arch = "aarch64"))]
Expand Down
2 changes: 1 addition & 1 deletion ch04/a-epoll/src/poll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl Poll {
return Err(io::Error::last_os_error());
};

// This is safe because epol_wait ensures that `res` events are assigned.
// This is safe because epoll_wait ensures that `res` events are assigned.
unsafe { events.set_len(res as usize) };
Ok(())
}
Expand Down
2 changes: 1 addition & 1 deletion ch05/d-fibers-closure/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ unsafe fn switch() {
);
}

// The main function has aslo changed
// The main function has also changed
#[cfg(not(windows))]
pub fn main() {
let mut runtime = Runtime::new();
Expand Down
4 changes: 2 additions & 2 deletions ch07/corofy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ impl Future for Coroutine{id} {{
// We need to special case the first call since that
// happens before we reach an `await` point

// This will recieve the input args to the function
// This will receive the input args to the function
let impl_fut_first_args = format_args_names_only(&args);

if i == 0 {
Expand Down Expand Up @@ -332,7 +332,7 @@ impl Future for Coroutine{id} {{
"
)?;

// These steps are await-ponts where we await a future
// These steps are await-points where we await a future
} else if i < steps.len() - 1 {
let varname = &futures[i - 1].0;
let fut = &futures[i].1;
Expand Down
4 changes: 2 additions & 2 deletions delayserver/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ use actix_web::{Responder, get, HttpServer, App, web, rt::time::sleep};
const EXPLANATION: &str =
"USAGE:
Delay server works by issuing a http GET request in the format:
http://localhost:8080/[delay in ms]/[UrlEncoded meesage]
http://localhost:8080/[delay in ms]/[UrlEncoded message]

On reception, it immidiately reports the following to the console:
On reception, it immediately reports the following to the console:
{Message #} - {delay in ms}: {message}

The server then delays the response for the requested time and echoes the message back to the caller.
Expand Down