From 0f3ef5ee0a76044371f7a3b00581ef472edb5a8d Mon Sep 17 00:00:00 2001 From: James Ray <16969914+jamesray1@users.noreply.github.com> Date: Sat, 3 Nov 2018 02:40:00 +1100 Subject: [PATCH] eg. -> e.g.; ie. -> i.e. via repren (#592) * eg. -> e.g.; ie. -> i.e. via repren * se.g. -> seg. --- core/src/lib.rs | 2 +- core/src/transport/mod.rs | 4 ++-- core/src/upgrade/traits.rs | 2 +- misc/multistream-select/src/length_delimited.rs | 2 +- misc/multistream-select/src/lib.rs | 2 +- misc/multistream-select/src/listener_select.rs | 2 +- protocols/identify/src/protocol.rs | 4 ++-- protocols/kad/src/kad_server.rs | 2 +- stores/peerstore/src/lib.rs | 2 +- stores/peerstore/src/peerstore.rs | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/core/src/lib.rs b/core/src/lib.rs index d135f169..4d727bb5 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -27,7 +27,7 @@ //! //! The main trait that this crate provides is `Transport`, which provides the `dial` and //! `listen_on` methods and can be used to dial or listen on a multiaddress. The `swarm` crate -//! itself does not provide any concrete (ie. non-dummy, non-adapter) implementation of this trait. +//! itself does not provide any concrete (i.e. non-dummy, non-adapter) implementation of this trait. //! It is implemented on structs that are provided by external crates, such as `TcpConfig` from //! `tcp-transport`, `UdpConfig`, or `WebsocketConfig` (note: as of the writing of this //! documentation, the last two structs don't exist yet). diff --git a/core/src/transport/mod.rs b/core/src/transport/mod.rs index 7a353f1e..21c7107c 100644 --- a/core/src/transport/mod.rs +++ b/core/src/transport/mod.rs @@ -55,7 +55,7 @@ pub use self::upgrade::UpgradedNode; /// A transport is an object that can be used to produce connections by listening or dialing a /// peer. /// -/// This trait is implemented on concrete transports (eg. TCP, UDP, etc.), but also on wrappers +/// This trait is implemented on concrete transports (e.g. TCP, UDP, etc.), but also on wrappers /// around them. /// /// > **Note**: The methods of this trait use `self` and not `&self` or `&mut self`. In other @@ -74,7 +74,7 @@ pub trait Transport { type Listener: Stream; /// After a connection has been received, we may need to do some asynchronous pre-processing - /// on it (eg. an intermediary protocol negotiation). While this pre-processing takes place, we + /// on it (e.g. an intermediary protocol negotiation). While this pre-processing takes place, we /// want to be able to continue polling on the listener. type ListenerUpgrade: Future; diff --git a/core/src/upgrade/traits.rs b/core/src/upgrade/traits.rs index 16493e4c..7f987b65 100644 --- a/core/src/upgrade/traits.rs +++ b/core/src/upgrade/traits.rs @@ -73,7 +73,7 @@ pub trait ConnectionUpgrade { /// This method is called after protocol negotiation has been performed. /// - /// Because performing the upgrade may not be instantaneous (eg. it may require a handshake), + /// Because performing the upgrade may not be instantaneous (e.g. it may require a handshake), /// this function returns a future instead of the direct output. fn upgrade(self, socket: C, id: Self::UpgradeIdentifier, ty: Endpoint) -> Self::Future; } diff --git a/misc/multistream-select/src/length_delimited.rs b/misc/multistream-select/src/length_delimited.rs index f342f724..8ac8c712 100644 --- a/misc/multistream-select/src/length_delimited.rs +++ b/misc/multistream-select/src/length_delimited.rs @@ -81,7 +81,7 @@ where /// # Panic /// /// Will panic if called while there is data inside the buffer. **This can only happen if - /// you call `poll()` manually**. Using this struct as it is intended to be used (ie. through + /// you call `poll()` manually**. Using this struct as it is intended to be used (i.e. through /// the modifiers provided by the `futures` crate) will always leave the object in a state in /// which `into_inner()` will not panic. #[inline] diff --git a/misc/multistream-select/src/lib.rs b/misc/multistream-select/src/lib.rs index 102dc37a..f68e6b42 100644 --- a/misc/multistream-select/src/lib.rs +++ b/misc/multistream-select/src/lib.rs @@ -28,7 +28,7 @@ //! //! Whenever a new connection or a new multiplexed substream is opened, libp2p uses //! `multistream-select` to negotiate with the remote which protocol to use. After a protocol has -//! been successfully negotiated, the stream (ie. the connection or the multiplexed substream) +//! been successfully negotiated, the stream (i.e. the connection or the multiplexed substream) //! immediately stops using `multistream-select` and starts using the negotiated protocol. //! //! ## Protocol explanation diff --git a/misc/multistream-select/src/listener_select.rs b/misc/multistream-select/src/listener_select.rs index a910ad4a..c47c44e2 100644 --- a/misc/multistream-select/src/listener_select.rs +++ b/misc/multistream-select/src/listener_select.rs @@ -31,7 +31,7 @@ use ProtocolChoiceError; /// Helps selecting a protocol amongst the ones supported. /// /// This function expects a socket and an iterator of the list of supported protocols. The iterator -/// must be clonable (ie. iterable multiple times), because the list may need to be accessed +/// must be clonable (i.e. iterable multiple times), because the list may need to be accessed /// multiple times. /// /// The iterator must produce tuples of the name of the protocol that is advertised to the remote, diff --git a/protocols/identify/src/protocol.rs b/protocols/identify/src/protocol.rs index aed10431..f6ec3f20 100644 --- a/protocols/identify/src/protocol.rs +++ b/protocols/identify/src/protocol.rs @@ -99,14 +99,14 @@ where pub struct IdentifyInfo { /// Public key of the node. pub public_key: PublicKey, - /// Version of the "global" protocol, eg. `ipfs/1.0.0` or `polkadot/1.0.0`. + /// Version of the "global" protocol, e.g. `ipfs/1.0.0` or `polkadot/1.0.0`. pub protocol_version: String, /// Name and version of the client. Can be thought as similar to the `User-Agent` header /// of HTTP. pub agent_version: String, /// Addresses that the node is listening on. pub listen_addrs: Vec, - /// Protocols supported by the node, eg. `/ipfs/ping/1.0.0`. + /// Protocols supported by the node, e.g. `/ipfs/ping/1.0.0`. pub protocols: Vec, } diff --git a/protocols/kad/src/kad_server.rs b/protocols/kad/src/kad_server.rs index 521bc1a0..b4180502 100644 --- a/protocols/kad/src/kad_server.rs +++ b/protocols/kad/src/kad_server.rs @@ -96,7 +96,7 @@ where pub struct KadConnecController { // In order to send a request, we use this sender to send a tuple. The first element of the // tuple is the message to send to the remote, and the second element is what is used to - // receive the response. If the query doesn't expect a response (eg. `PUT_VALUE`), then the + // receive the response. If the query doesn't expect a response (e.g. `PUT_VALUE`), then the // one-shot sender will be dropped without being used. inner: mpsc::UnboundedSender<(KadMsg, oneshot::Sender)>, } diff --git a/stores/peerstore/src/lib.rs b/stores/peerstore/src/lib.rs index c615f94f..34a07874 100644 --- a/stores/peerstore/src/lib.rs +++ b/stores/peerstore/src/lib.rs @@ -31,7 +31,7 @@ //! - `MemoryPeerstore`: Stores the information in memory. //! //! Note that the peerstore implementations do not consider information inside a peer store to be -//! critical. In case of an error (eg. corrupted file, disk error, etc.) they will prefer to lose +//! critical. In case of an error (e.g. corrupted file, disk error, etc.) they will prefer to lose //! data rather than returning the error. //! //! # Example diff --git a/stores/peerstore/src/peerstore.rs b/stores/peerstore/src/peerstore.rs index a1661499..9f94cc66 100644 --- a/stores/peerstore/src/peerstore.rs +++ b/stores/peerstore/src/peerstore.rs @@ -24,7 +24,7 @@ use {PeerId, TTL}; /// Implemented on objects that store peers. /// -/// Note that the methods of this trait take by ownership (ie. `self` instead of `&self` or +/// Note that the methods of this trait take by ownership (i.e. `self` instead of `&self` or /// `&mut self`). This was made so that the associated types could hold `self` internally and /// because Rust doesn't have higher-ranked trait bounds yet. ///