fix typos (#50)

This commit is contained in:
avinassh
2020-05-21 01:28:16 +05:30
committed by GitHub
parent 4c9edec0b1
commit 4c9ef8b31f
6 changed files with 8 additions and 8 deletions

View File

@@ -457,7 +457,7 @@ impl Subscriber {
self.subscribed_channels.retain(|c| *channel != &c[..]);
// Only a single channel should be removed from the
// liste of subscribed channels.
// list of subscribed channels.
if self.subscribed_channels.len() != len - 1 {
return Err(response.to_error());
}

View File

@@ -105,7 +105,7 @@ impl Set {
Ok(Set { key, value, expire })
}
/// Apply the `Get` command to the specified `Db` instace.
/// Apply the `Get` command to the specified `Db` instance.
///
/// The response is written to `dst`. This is called by the server in order
/// to execute a received command.

View File

@@ -54,7 +54,7 @@ impl Connection {
/// # Returns
///
/// On success, the received frame is returned. If the `TcpStream`
/// is closed in a way that doesn't break a frame in half, it retuns
/// is closed in a way that doesn't break a frame in half, it returns
/// `None`. Otherwise, an error is returned.
pub(crate) async fn read_frame(&mut self) -> crate::Result<Option<Frame>> {
use frame::Error::Incomplete;
@@ -98,7 +98,7 @@ impl Connection {
// When `advance` is called on the read buffer, all of the
// data up to `len` is discarded. The details of how this
// works is left to `BytesMut`. This is often done by moving
// an internal cursor, but it may be done by reallocataing
// an internal cursor, but it may be done by reallocating
// and copying data.
self.buffer.advance(len);

View File

@@ -253,7 +253,7 @@ impl Drop for Db {
//
// First, determine if this is the last `Db` instance. This is done by
// checking `strong_count`. The count will be 2. One for this `Db`
// intance and one for the handle held by the background task.
// instance and one for the handle held by the background task.
if Arc::strong_count(&self.shared) == 2 {
// The background task must be signaled to shutdown. This is done by
// setting `State::shutdown` to `true` and signalling the task.

View File

@@ -55,7 +55,7 @@ pub const DEFAULT_PORT: &str = "6379";
/// Error returned by most functions.
///
/// When writing a real application, one might want to consider a specialized
/// errror handling crate or defining an error type as an `enum` of causes.
/// error handling crate or defining an error type as an `enum` of causes.
/// However, for our example, using a boxed `std::error::Error` is sufficient.
///
/// For performance reasons, boxing is avoided in any hot path. For example, in

View File

@@ -98,7 +98,7 @@ struct Handler {
/// connection until the peer disconnects **or** a shutdown notification is
/// received from `shutdown`. In the latter case, any in-flight work being
/// processed for the peer is continued until it reaches a safe state, at
/// which point the connction is terminated.
/// which point the connection is terminated.
shutdown: Shutdown,
/// Not used directly. Instead, when `Handler` is dropped...?
@@ -380,7 +380,7 @@ impl Drop for Handler {
// Doing so unblocks the listener if the max number of
// connections has been reached.
//
// This is done in a `Drop` implementation in order to guaranatee that
// This is done in a `Drop` implementation in order to guarantee that
// the permit is added even if the task handling the connection panics.
// If `add_permit` was called at the end of the `run` function and some
// bug causes a panic. The permit would never be returned to the