Skip to content

Commit da60364

Browse files
committed
consensus_encoding: fix consensus-encoding package name
Updated the package name to match the correct crate name: https://crates.io/crates/bitcoin-consensus-encoding Closes rust-bitcoin#5069
1 parent a80db08 commit da60364

File tree

10 files changed

+36
-36
lines changed

10 files changed

+36
-36
lines changed

Cargo-minimal.lock

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,14 @@ dependencies = [
7272
name = "bitcoin-addresses"
7373
version = "0.0.0"
7474

75+
[[package]]
76+
name = "bitcoin-consensus-encoding"
77+
version = "0.1.0"
78+
dependencies = [
79+
"bitcoin-internals",
80+
"bitcoin_hashes 0.16.0",
81+
]
82+
7583
[[package]]
7684
name = "bitcoin-fuzz"
7785
version = "0.0.1"
@@ -129,10 +137,10 @@ dependencies = [
129137
"arbitrary",
130138
"arrayvec",
131139
"bincode",
140+
"bitcoin-consensus-encoding",
132141
"bitcoin-internals",
133142
"bitcoin-units",
134143
"bitcoin_hashes 0.16.0",
135-
"consensus-encoding",
136144
"hex-conservative 0.3.0",
137145
"serde",
138146
"serde_json",
@@ -144,8 +152,8 @@ version = "1.0.0-rc.0"
144152
dependencies = [
145153
"arbitrary",
146154
"bincode",
155+
"bitcoin-consensus-encoding",
147156
"bitcoin-internals",
148-
"consensus-encoding",
149157
"serde",
150158
"serde_json",
151159
"serde_test",
@@ -205,14 +213,6 @@ dependencies = [
205213
"hex-conservative 0.3.0",
206214
]
207215

208-
[[package]]
209-
name = "consensus-encoding"
210-
version = "0.0.0"
211-
dependencies = [
212-
"bitcoin-internals",
213-
"bitcoin_hashes 0.16.0",
214-
]
215-
216216
[[package]]
217217
name = "getrandom"
218218
version = "0.2.0"

Cargo-recent.lock

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,14 @@ dependencies = [
7171
name = "bitcoin-addresses"
7272
version = "0.0.0"
7373

74+
[[package]]
75+
name = "bitcoin-consensus-encoding"
76+
version = "0.1.0"
77+
dependencies = [
78+
"bitcoin-internals",
79+
"bitcoin_hashes 0.16.0",
80+
]
81+
7482
[[package]]
7583
name = "bitcoin-fuzz"
7684
version = "0.0.1"
@@ -128,10 +136,10 @@ dependencies = [
128136
"arbitrary",
129137
"arrayvec",
130138
"bincode",
139+
"bitcoin-consensus-encoding",
131140
"bitcoin-internals",
132141
"bitcoin-units",
133142
"bitcoin_hashes 0.16.0",
134-
"consensus-encoding",
135143
"hex-conservative 0.3.0",
136144
"serde",
137145
"serde_json",
@@ -143,8 +151,8 @@ version = "1.0.0-rc.0"
143151
dependencies = [
144152
"arbitrary",
145153
"bincode",
154+
"bitcoin-consensus-encoding",
146155
"bitcoin-internals",
147-
"consensus-encoding",
148156
"serde",
149157
"serde_json",
150158
"serde_test",
@@ -207,14 +215,6 @@ dependencies = [
207215
"hex-conservative 0.3.0",
208216
]
209217

210-
[[package]]
211-
name = "consensus-encoding"
212-
version = "0.0.0"
213-
dependencies = [
214-
"bitcoin-internals",
215-
"bitcoin_hashes 0.16.0",
216-
]
217-
218218
[[package]]
219219
name = "getrandom"
220220
version = "0.2.15"

consensus_encoding/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
2-
name = "consensus-encoding"
3-
version = "0.0.0"
2+
name = "bitcoin-consensus-encoding"
3+
version = "0.1.0"
44
authors = ["Andrew Poelstra <apoelstra@wpsoftware.net>", "Tobin C. Harding <me@tobin.cc>"]
55
license = "CC0-1.0"
66
repository = "https://github.com/rust-bitcoin/rust-bitcoin/"

consensus_encoding/examples/encoder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
//! Example of creating an encoder that encodes a slice of encodable objects.
44
5-
use consensus_encoding as encoding;
5+
use bitcoin_consensus_encoding as encoding;
66
use encoding::{ArrayEncoder, BytesEncoder, CompactSizeEncoder, Encodable, Encoder2, SliceEncoder};
77

88
fn main() {

consensus_encoding/tests/composition.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
//! Test composition of encoders and decoders.
44
5-
use consensus_encoding::{
5+
use bitcoin_consensus_encoding::{
66
ArrayDecoder, ArrayEncoder, Decodable, Decoder, Decoder2, Decoder6, Encodable, Encoder,
77
Encoder2, Encoder6, UnexpectedEofError,
88
};

consensus_encoding/tests/decode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
//! Integration tests for decode module.
44
5-
use consensus_encoding::{ArrayDecoder, Decoder, UnexpectedEofError};
5+
use bitcoin_consensus_encoding::{ArrayDecoder, Decoder, UnexpectedEofError};
66

77
const EMPTY: &[u8] = &[];
88

consensus_encoding/tests/encode.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#[cfg(feature = "std")]
66
use std::io::{Cursor, Write};
77

8-
use consensus_encoding::{ArrayEncoder, BytesEncoder, Encodable, Encoder};
8+
use bitcoin_consensus_encoding::{ArrayEncoder, BytesEncoder, Encodable, Encoder};
99

1010
// Simple test type that implements Encodable.
1111
#[cfg(feature = "alloc")]
@@ -43,7 +43,7 @@ fn encode_std_writer() {
4343
let data = TestData(0x1234_5678);
4444

4545
let mut cursor = Cursor::new(Vec::new());
46-
consensus_encoding::encode_to_writer(&data, &mut cursor).unwrap();
46+
bitcoin_consensus_encoding::encode_to_writer(&data, &mut cursor).unwrap();
4747

4848
let result = cursor.into_inner();
4949
assert_eq!(result, vec![0x78, 0x56, 0x34, 0x12]);
@@ -53,15 +53,15 @@ fn encode_std_writer() {
5353
#[cfg(feature = "alloc")]
5454
fn encode_vec() {
5555
let data = TestData(0xDEAD_BEEF);
56-
let vec = consensus_encoding::encode_to_vec(&data);
56+
let vec = bitcoin_consensus_encoding::encode_to_vec(&data);
5757
assert_eq!(vec, vec![0xEF, 0xBE, 0xAD, 0xDE]);
5858
}
5959

6060
#[test]
6161
#[cfg(feature = "alloc")]
6262
fn encode_vec_empty_data() {
6363
let data = EmptyData;
64-
let result = consensus_encoding::encode_to_vec(&data);
64+
let result = bitcoin_consensus_encoding::encode_to_vec(&data);
6565
assert!(result.is_empty());
6666
}
6767

@@ -70,7 +70,7 @@ fn encode_vec_empty_data() {
7070
fn encode_std_writer_empty_data() {
7171
let data = EmptyData;
7272
let mut cursor = Cursor::new(Vec::new());
73-
consensus_encoding::encode_to_writer(&data, &mut cursor).unwrap();
73+
bitcoin_consensus_encoding::encode_to_writer(&data, &mut cursor).unwrap();
7474

7575
let result = cursor.into_inner();
7676
assert!(result.is_empty());
@@ -93,7 +93,7 @@ fn encode_std_writer_io_error() {
9393
let data = TestData(0x1234_5678);
9494
let mut writer = FailingWriter;
9595

96-
let result = consensus_encoding::encode_to_writer(&data, &mut writer);
96+
let result = bitcoin_consensus_encoding::encode_to_writer(&data, &mut writer);
9797

9898
assert!(result.is_err());
9999
assert_eq!(result.unwrap_err().kind(), std::io::ErrorKind::Other);
@@ -103,10 +103,10 @@ fn encode_std_writer_io_error() {
103103
fn encode_newtype_lifetime_flexibility() {
104104
// Test that the encoder_newtype macro allows different lifetime names.
105105

106-
consensus_encoding::encoder_newtype! {
106+
bitcoin_consensus_encoding::encoder_newtype! {
107107
pub struct CustomEncoder<'data>(BytesEncoder<'data>);
108108
}
109-
consensus_encoding::encoder_newtype! {
109+
bitcoin_consensus_encoding::encoder_newtype! {
110110
pub struct NoLifetimeEncoder(ArrayEncoder<4>);
111111
}
112112

consensus_encoding/tests/wrappers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
#![cfg(feature = "std")]
44

5-
use consensus_encoding as encoding;
5+
use bitcoin_consensus_encoding as encoding;
66
use encoding::{ArrayEncoder, BytesEncoder, CompactSizeEncoder, Encodable, Encoder2, SliceEncoder};
77

88
encoding::encoder_newtype! {

primitives/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ arbitrary = ["dep:arbitrary", "units/arbitrary"]
2323
hex = ["dep:hex", "hashes/hex", "internals/hex"]
2424

2525
[dependencies]
26-
encoding = { package = "consensus-encoding", path = "../consensus_encoding", default-features = false }
26+
encoding = { package = "bitcoin-consensus-encoding", path = "../consensus_encoding", default-features = false }
2727
hashes = { package = "bitcoin_hashes", path = "../hashes", default-features = false }
2828
internals = { package = "bitcoin-internals", path = "../internals" }
2929
units = { package = "bitcoin-units", path = "../units", default-features = false, features = [ "encoding" ] }

units/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ std = ["alloc", "internals/std", "encoding?/std"]
1818
alloc = ["internals/alloc", "serde?/alloc", "encoding?/alloc"]
1919

2020
[dependencies]
21-
encoding = { package = "consensus-encoding", path = "../consensus_encoding", default-features = false, optional = true }
21+
encoding = { package = "bitcoin-consensus-encoding", path = "../consensus_encoding", default-features = false, optional = true }
2222
internals = { package = "bitcoin-internals", path = "../internals", version = "0.4.0" }
2323

2424
serde = { version = "1.0.195", default-features = false, features = ["derive"], optional = true }

0 commit comments

Comments
 (0)