Skip to content

Commit 4c9ef8b

Browse files
authored
fix typos (#50)
1 parent 4c9edec commit 4c9ef8b

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

src/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ impl Subscriber {
457457
self.subscribed_channels.retain(|c| *channel != &c[..]);
458458

459459
// Only a single channel should be removed from the
460-
// liste of subscribed channels.
460+
// list of subscribed channels.
461461
if self.subscribed_channels.len() != len - 1 {
462462
return Err(response.to_error());
463463
}

src/cmd/set.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ impl Set {
105105
Ok(Set { key, value, expire })
106106
}
107107

108-
/// Apply the `Get` command to the specified `Db` instace.
108+
/// Apply the `Get` command to the specified `Db` instance.
109109
///
110110
/// The response is written to `dst`. This is called by the server in order
111111
/// to execute a received command.

src/connection.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ impl Connection {
5454
/// # Returns
5555
///
5656
/// On success, the received frame is returned. If the `TcpStream`
57-
/// is closed in a way that doesn't break a frame in half, it retuns
57+
/// is closed in a way that doesn't break a frame in half, it returns
5858
/// `None`. Otherwise, an error is returned.
5959
pub(crate) async fn read_frame(&mut self) -> crate::Result<Option<Frame>> {
6060
use frame::Error::Incomplete;
@@ -98,7 +98,7 @@ impl Connection {
9898
// When `advance` is called on the read buffer, all of the
9999
// data up to `len` is discarded. The details of how this
100100
// works is left to `BytesMut`. This is often done by moving
101-
// an internal cursor, but it may be done by reallocataing
101+
// an internal cursor, but it may be done by reallocating
102102
// and copying data.
103103
self.buffer.advance(len);
104104

src/db.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ impl Drop for Db {
253253
//
254254
// First, determine if this is the last `Db` instance. This is done by
255255
// checking `strong_count`. The count will be 2. One for this `Db`
256-
// intance and one for the handle held by the background task.
256+
// instance and one for the handle held by the background task.
257257
if Arc::strong_count(&self.shared) == 2 {
258258
// The background task must be signaled to shutdown. This is done by
259259
// setting `State::shutdown` to `true` and signalling the task.

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pub const DEFAULT_PORT: &str = "6379";
5555
/// Error returned by most functions.
5656
///
5757
/// When writing a real application, one might want to consider a specialized
58-
/// errror handling crate or defining an error type as an `enum` of causes.
58+
/// error handling crate or defining an error type as an `enum` of causes.
5959
/// However, for our example, using a boxed `std::error::Error` is sufficient.
6060
///
6161
/// For performance reasons, boxing is avoided in any hot path. For example, in

src/server.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ struct Handler {
9898
/// connection until the peer disconnects **or** a shutdown notification is
9999
/// received from `shutdown`. In the latter case, any in-flight work being
100100
/// processed for the peer is continued until it reaches a safe state, at
101-
/// which point the connction is terminated.
101+
/// which point the connection is terminated.
102102
shutdown: Shutdown,
103103

104104
/// Not used directly. Instead, when `Handler` is dropped...?
@@ -380,7 +380,7 @@ impl Drop for Handler {
380380
// Doing so unblocks the listener if the max number of
381381
// connections has been reached.
382382
//
383-
// This is done in a `Drop` implementation in order to guaranatee that
383+
// This is done in a `Drop` implementation in order to guarantee that
384384
// the permit is added even if the task handling the connection panics.
385385
// If `add_permit` was called at the end of the `run` function and some
386386
// bug causes a panic. The permit would never be returned to the

0 commit comments

Comments
 (0)