mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-04-25 11:02:12 +00:00
Rename multiaddr and mulithash to parity-* (#737)
* Rename multiaddr and mulithash to parity-* * Fix doctests
This commit is contained in:
parent
8d8fc75a4e
commit
d94a768bd9
@ -16,8 +16,8 @@ secio-secp256k1 = ["libp2p-secio/secp256k1"]
|
||||
[dependencies]
|
||||
bytes = "0.4"
|
||||
futures = "0.1"
|
||||
multiaddr = { path = "./misc/multiaddr" }
|
||||
multihash = { path = "./misc/multihash" }
|
||||
multiaddr = { package = "parity-multiaddr", path = "./misc/multiaddr" }
|
||||
multihash = { package = "parity-multihash", path = "./misc/multihash" }
|
||||
libp2p-mplex = { path = "./muxers/mplex" }
|
||||
libp2p-identify = { path = "./protocols/identify" }
|
||||
libp2p-kad = { path = "./protocols/kad" }
|
||||
|
@ -13,8 +13,8 @@ bs58 = "0.2.0"
|
||||
bytes = "0.4"
|
||||
fnv = "1.0"
|
||||
log = "0.4"
|
||||
multiaddr = { path = "../misc/multiaddr" }
|
||||
multihash = { path = "../misc/multihash" }
|
||||
multiaddr = { package = "parity-multiaddr", path = "../misc/multiaddr" }
|
||||
multihash = { package = "parity-multihash", path = "../misc/multihash" }
|
||||
multistream-select = { path = "../misc/multistream-select" }
|
||||
futures = { version = "0.1", features = ["use_std"] }
|
||||
parking_lot = "0.7"
|
||||
|
@ -13,7 +13,7 @@ data-encoding = "2.0"
|
||||
dns-parser = "0.8"
|
||||
futures = "0.1"
|
||||
libp2p-core = { path = "../../core" }
|
||||
multiaddr = { path = "../multiaddr" }
|
||||
multiaddr = { package = "parity-multiaddr", path = "../multiaddr" }
|
||||
net2 = "0.2"
|
||||
rand = "0.6"
|
||||
tokio-reactor = "0.1"
|
||||
|
@ -1,19 +1,19 @@
|
||||
[package]
|
||||
authors = ["dignifiedquire <dignifiedquire@gmail.com>"]
|
||||
name = "parity-multiaddr"
|
||||
authors = ["dignifiedquire <dignifiedquire@gmail.com>", "Parity Technologies <admin@parity.io>"]
|
||||
description = "Implementation of the multiaddr format"
|
||||
homepage = "https://github.com/multiformats/rust-multiaddr"
|
||||
homepage = "https://github.com/libp2p/rust-libp2p"
|
||||
keywords = ["multiaddr", "ipfs"]
|
||||
license = "MIT"
|
||||
name = "multiaddr"
|
||||
readme = "README.md"
|
||||
version = "0.3.0"
|
||||
version = "0.1.0"
|
||||
|
||||
[dependencies]
|
||||
arrayref = "0.3"
|
||||
bs58 = "0.2.0"
|
||||
byteorder = "0.4"
|
||||
data-encoding = "2.1"
|
||||
multihash = { path = "../multihash" }
|
||||
multihash = { package = "parity-multihash", path = "../multihash" }
|
||||
serde = "1.0.70"
|
||||
unsigned-varint = "0.2"
|
||||
|
||||
@ -21,7 +21,7 @@ unsigned-varint = "0.2"
|
||||
bincode = "1"
|
||||
bs58 = "0.2.0"
|
||||
data-encoding = "2"
|
||||
multihash = { path = "../multihash" }
|
||||
multihash = { package = "parity-multihash", path = "../multihash" }
|
||||
quickcheck = "0.7"
|
||||
rand = "0.6"
|
||||
serde_json = "1.0"
|
@ -104,7 +104,7 @@ impl fmt::Display for Multiaddr {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use multiaddr::Multiaddr;
|
||||
/// use parity_multiaddr::Multiaddr;
|
||||
///
|
||||
/// let address: Multiaddr = "/ip4/127.0.0.1/udt".parse().unwrap();
|
||||
/// assert_eq!(address.to_string(), "/ip4/127.0.0.1/udt");
|
||||
@ -158,7 +158,7 @@ impl Multiaddr {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use multiaddr::Multiaddr;
|
||||
/// use parity_multiaddr::Multiaddr;
|
||||
///
|
||||
/// let address: Multiaddr = "/ip4/127.0.0.1".parse().unwrap();
|
||||
/// let nested = address.encapsulate("/udt").unwrap();
|
||||
@ -177,7 +177,7 @@ impl Multiaddr {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use multiaddr::{Multiaddr, Protocol};
|
||||
/// use parity_multiaddr::{Multiaddr, Protocol};
|
||||
///
|
||||
/// let mut address: Multiaddr = "/ip4/127.0.0.1".parse().unwrap();
|
||||
/// address.append(Protocol::Tcp(10000));
|
||||
@ -197,7 +197,7 @@ impl Multiaddr {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use multiaddr::{Multiaddr, ToMultiaddr};
|
||||
/// use parity_multiaddr::{Multiaddr, ToMultiaddr};
|
||||
///
|
||||
/// let address: Multiaddr = "/ip4/127.0.0.1/udt/sctp/5678".parse().unwrap();
|
||||
/// let unwrapped = address.decapsulate("/udt").unwrap();
|
||||
@ -212,7 +212,7 @@ impl Multiaddr {
|
||||
/// Returns the original if the passed in address is not found
|
||||
///
|
||||
/// ```
|
||||
/// use multiaddr::ToMultiaddr;
|
||||
/// use parity_multiaddr::ToMultiaddr;
|
||||
///
|
||||
/// let address = "/ip4/127.0.0.1/udt/sctp/5678".to_multiaddr().unwrap();
|
||||
/// let unwrapped = address.decapsulate("/ip4/127.0.1.1").unwrap();
|
||||
@ -256,7 +256,7 @@ impl Multiaddr {
|
||||
///
|
||||
/// ```
|
||||
/// use std::net::Ipv4Addr;
|
||||
/// use multiaddr::{Multiaddr, Protocol};
|
||||
/// use parity_multiaddr::{Multiaddr, Protocol};
|
||||
///
|
||||
/// let address: Multiaddr = "/ip4/127.0.0.1/udt/sctp/5678".parse().unwrap();
|
||||
///
|
||||
@ -273,7 +273,7 @@ impl Multiaddr {
|
||||
|
||||
/// Pops the last `Protocol` of this multiaddr, or `None` if the multiaddr is empty.
|
||||
/// ```
|
||||
/// use multiaddr::{Multiaddr, Protocol};
|
||||
/// use parity_multiaddr::{Multiaddr, Protocol};
|
||||
///
|
||||
/// let mut address: Multiaddr = "/ip4/127.0.0.1/udt/sctp/5678".parse().unwrap();
|
||||
///
|
||||
|
@ -1,15 +1,15 @@
|
||||
extern crate bs58;
|
||||
extern crate bincode;
|
||||
extern crate data_encoding;
|
||||
extern crate multiaddr;
|
||||
extern crate parity_multiaddr;
|
||||
extern crate multihash;
|
||||
extern crate quickcheck;
|
||||
extern crate rand;
|
||||
extern crate serde_json;
|
||||
|
||||
use data_encoding::HEXUPPER;
|
||||
use multiaddr::*;
|
||||
use multihash::Multihash;
|
||||
use parity_multiaddr::*;
|
||||
use quickcheck::{Arbitrary, Gen, QuickCheck};
|
||||
use rand::Rng;
|
||||
use std::{
|
||||
|
@ -1,19 +1,13 @@
|
||||
[package]
|
||||
name = "multihash"
|
||||
name = "parity-multihash"
|
||||
description = "Implementation of the multihash format"
|
||||
repository = "https://github.com/multiformats/rust-multihash"
|
||||
|
||||
repository = "https://github.com/libp2p/rust-libp2p"
|
||||
keywords = ["multihash", "ipfs"]
|
||||
|
||||
version = "0.8.1-pre"
|
||||
|
||||
authors = ["dignifiedquire <dignifiedquire@gmail.com>"]
|
||||
|
||||
version = "0.1.0"
|
||||
authors = ["dignifiedquire <dignifiedquire@gmail.com>", "Parity Technologies <admin@parity.io>"]
|
||||
license = "MIT"
|
||||
|
||||
readme = "README.md"
|
||||
|
||||
documentation = "https://docs.rs/multihash/"
|
||||
documentation = "https://docs.rs/parity-multihash/"
|
||||
|
||||
[dependencies]
|
||||
blake2 = { version = "0.8", default-features = false }
|
||||
|
@ -73,7 +73,7 @@ macro_rules! match_encoder {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use multihash::{encode, Hash};
|
||||
/// use parity_multihash::{encode, Hash};
|
||||
///
|
||||
/// assert_eq!(
|
||||
/// encode(Hash::SHA2256, b"hello world").unwrap().into_bytes(),
|
||||
|
@ -1,6 +1,6 @@
|
||||
extern crate multihash;
|
||||
extern crate parity_multihash;
|
||||
|
||||
use multihash::*;
|
||||
use parity_multihash::*;
|
||||
|
||||
/// Helper function to convert a hex-encoded byte array back into a bytearray
|
||||
fn hex_to_bytes(s: &str) -> Vec<u8> {
|
||||
|
@ -14,7 +14,7 @@ fnv = "1"
|
||||
futures = "0.1"
|
||||
libp2p-core = { path = "../../core" }
|
||||
log = "0.4.1"
|
||||
multiaddr = { path = "../../misc/multiaddr" }
|
||||
multiaddr = { package = "parity-multiaddr", path = "../../misc/multiaddr" }
|
||||
parking_lot = "0.7"
|
||||
protobuf = "2.0.2"
|
||||
smallvec = "0.6"
|
||||
|
@ -19,8 +19,8 @@ libp2p-identify = { path = "../../protocols/identify" }
|
||||
libp2p-ping = { path = "../../protocols/ping" }
|
||||
libp2p-core = { path = "../../core" }
|
||||
log = "0.4"
|
||||
multiaddr = { path = "../../misc/multiaddr" }
|
||||
multihash = { path = "../../misc/multihash" }
|
||||
multiaddr = { package = "parity-multiaddr", path = "../../misc/multiaddr" }
|
||||
multihash = { package = "parity-multihash", path = "../../misc/multihash" }
|
||||
parking_lot = "0.7"
|
||||
protobuf = "2.0.2"
|
||||
rand = "0.6.0"
|
||||
|
@ -13,7 +13,7 @@ arrayvec = "0.4"
|
||||
bytes = "0.4"
|
||||
libp2p-core = { path = "../../core" }
|
||||
log = "0.4.1"
|
||||
multiaddr = { path = "../../misc/multiaddr" }
|
||||
multiaddr = { package = "parity-multiaddr", path = "../../misc/multiaddr" }
|
||||
multistream-select = { path = "../../misc/multistream-select" }
|
||||
futures = "0.1"
|
||||
parking_lot = "0.7"
|
||||
|
@ -12,7 +12,7 @@ categories = ["network-programming", "asynchronous"]
|
||||
libp2p-core = { path = "../../core" }
|
||||
log = "0.4.1"
|
||||
futures = "0.1"
|
||||
multiaddr = { path = "../../misc/multiaddr" }
|
||||
multiaddr = { package = "parity-multiaddr", path = "../../misc/multiaddr" }
|
||||
tokio-dns-unofficial = "0.4"
|
||||
tokio-io = "0.1"
|
||||
|
||||
|
@ -12,7 +12,7 @@ categories = ["network-programming", "asynchronous"]
|
||||
libp2p-core = { path = "../../core" }
|
||||
log = "0.4.1"
|
||||
futures = "0.1"
|
||||
multiaddr = { path = "../../misc/multiaddr" }
|
||||
multiaddr = { package = "parity-multiaddr", path = "../../misc/multiaddr" }
|
||||
tk-listen = "0.2.0"
|
||||
tokio-io = "0.1"
|
||||
tokio-tcp = "0.1"
|
||||
|
@ -12,7 +12,7 @@ categories = ["network-programming", "asynchronous"]
|
||||
libp2p-core = { path = "../../core" }
|
||||
log = "0.4.1"
|
||||
futures = "0.1"
|
||||
multiaddr = { path = "../../misc/multiaddr" }
|
||||
multiaddr = { package = "parity-multiaddr", path = "../../misc/multiaddr" }
|
||||
tokio-uds = "0.2"
|
||||
|
||||
[target.'cfg(all(unix, not(target_os = "emscripten")))'.dev-dependencies]
|
||||
|
@ -11,7 +11,7 @@ categories = ["network-programming", "asynchronous"]
|
||||
[dependencies]
|
||||
libp2p-core = { path = "../../core" }
|
||||
futures = "0.1"
|
||||
multiaddr = { path = "../../misc/multiaddr" }
|
||||
multiaddr = { package = "parity-multiaddr", path = "../../misc/multiaddr" }
|
||||
log = "0.4.1"
|
||||
rw-stream-sink = { path = "../../misc/rw-stream-sink" }
|
||||
tokio-io = "0.1"
|
||||
|
Loading…
x
Reference in New Issue
Block a user