eg. -> e.g.; ie. -> i.e. via repren (#592)

* eg. -> e.g.; ie. -> i.e. via repren

* se.g. -> seg.
This commit is contained in:
James Ray
2018-11-03 02:40:00 +11:00
committed by Pierre Krieger
parent 4225d2631b
commit 0f3ef5ee0a
10 changed files with 12 additions and 12 deletions

View File

@ -27,7 +27,7 @@
//! //!
//! The main trait that this crate provides is `Transport`, which provides the `dial` and //! 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 //! `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 //! 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 //! `tcp-transport`, `UdpConfig`, or `WebsocketConfig` (note: as of the writing of this
//! documentation, the last two structs don't exist yet). //! documentation, the last two structs don't exist yet).

View File

@ -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 /// A transport is an object that can be used to produce connections by listening or dialing a
/// peer. /// 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. /// around them.
/// ///
/// > **Note**: The methods of this trait use `self` and not `&self` or `&mut self`. In other /// > **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<Item = (Self::ListenerUpgrade, Multiaddr), Error = IoError>; type Listener: Stream<Item = (Self::ListenerUpgrade, Multiaddr), Error = IoError>;
/// After a connection has been received, we may need to do some asynchronous pre-processing /// 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. /// want to be able to continue polling on the listener.
type ListenerUpgrade: Future<Item = Self::Output, Error = IoError>; type ListenerUpgrade: Future<Item = Self::Output, Error = IoError>;

View File

@ -73,7 +73,7 @@ pub trait ConnectionUpgrade<C> {
/// This method is called after protocol negotiation has been performed. /// 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. /// this function returns a future instead of the direct output.
fn upgrade(self, socket: C, id: Self::UpgradeIdentifier, ty: Endpoint) -> Self::Future; fn upgrade(self, socket: C, id: Self::UpgradeIdentifier, ty: Endpoint) -> Self::Future;
} }

View File

@ -81,7 +81,7 @@ where
/// # Panic /// # Panic
/// ///
/// Will panic if called while there is data inside the buffer. **This can only happen if /// 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 /// the modifiers provided by the `futures` crate) will always leave the object in a state in
/// which `into_inner()` will not panic. /// which `into_inner()` will not panic.
#[inline] #[inline]

View File

@ -28,7 +28,7 @@
//! //!
//! Whenever a new connection or a new multiplexed substream is opened, libp2p uses //! 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 //! `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. //! immediately stops using `multistream-select` and starts using the negotiated protocol.
//! //!
//! ## Protocol explanation //! ## Protocol explanation

View File

@ -31,7 +31,7 @@ use ProtocolChoiceError;
/// Helps selecting a protocol amongst the ones supported. /// Helps selecting a protocol amongst the ones supported.
/// ///
/// This function expects a socket and an iterator of the list of supported protocols. The iterator /// 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. /// multiple times.
/// ///
/// The iterator must produce tuples of the name of the protocol that is advertised to the remote, /// The iterator must produce tuples of the name of the protocol that is advertised to the remote,

View File

@ -99,14 +99,14 @@ where
pub struct IdentifyInfo { pub struct IdentifyInfo {
/// Public key of the node. /// Public key of the node.
pub public_key: PublicKey, 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, pub protocol_version: String,
/// Name and version of the client. Can be thought as similar to the `User-Agent` header /// Name and version of the client. Can be thought as similar to the `User-Agent` header
/// of HTTP. /// of HTTP.
pub agent_version: String, pub agent_version: String,
/// Addresses that the node is listening on. /// Addresses that the node is listening on.
pub listen_addrs: Vec<Multiaddr>, pub listen_addrs: Vec<Multiaddr>,
/// 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<String>, pub protocols: Vec<String>,
} }

View File

@ -96,7 +96,7 @@ where
pub struct KadConnecController { pub struct KadConnecController {
// In order to send a request, we use this sender to send a tuple. The first element of the // 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 // 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. // one-shot sender will be dropped without being used.
inner: mpsc::UnboundedSender<(KadMsg, oneshot::Sender<KadMsg>)>, inner: mpsc::UnboundedSender<(KadMsg, oneshot::Sender<KadMsg>)>,
} }

View File

@ -31,7 +31,7 @@
//! - `MemoryPeerstore`: Stores the information in memory. //! - `MemoryPeerstore`: Stores the information in memory.
//! //!
//! Note that the peerstore implementations do not consider information inside a peer store to be //! 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. //! data rather than returning the error.
//! //!
//! # Example //! # Example

View File

@ -24,7 +24,7 @@ use {PeerId, TTL};
/// Implemented on objects that store peers. /// 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 /// `&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. /// because Rust doesn't have higher-ranked trait bounds yet.
/// ///