Skip to content

Commit 7fc7347

Browse files
committed
rename feature ser-proto -> protobuf and expose in facade crate
1 parent 1e98561 commit 7fc7347

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ parquet = ["amadeus-parquet", "amadeus-derive/parquet"]
3030
postgres = ["amadeus-postgres", "amadeus-derive/postgres"]
3131
csv = ["amadeus-serde", "amadeus-derive/serde"]
3232
json = ["amadeus-serde", "amadeus-derive/serde"]
33+
protobuf = ["amadeus-streaming/protobuf"]
3334
bench = ["serde-csv", "once_cell", "arrow-parquet", "rayon"]
3435

3536
[package.metadata.docs.rs]

amadeus-streaming/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@ maintenance = { status = "actively-developed" }
2020

2121
[features]
2222
nightly = ["packed_simd"]
23-
ser-proto = ["protobuf"]
2423

2524
[dependencies]
2625
packed_simd = { version = "0.3", features = ["into_bits"], optional = true }
27-
protobuf = { version="2.22.1", optional = true }
26+
protobuf = { version = "2.22", optional = true }
2827
rand = { version = "0.7", features = ["small_rng"] }
2928
serde = { version = "1.0", features = ["derive"] }
3029
serde_closure = "0.3"

amadeus-streaming/src/distinct.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@
4444
// https://spark.apache.org/docs/latest/api/scala/index.html#org.apache.spark.rdd.RDD countApproxDistinct
4545
// is_x86_feature_detected ?
4646

47-
#[cfg(feature = "ser-proto")]
47+
#[cfg(feature = "protobuf")]
4848
use crate::proto_util;
49-
#[cfg(feature = "ser-proto")]
49+
#[cfg(feature = "protobuf")]
5050
use protobuf::CodedOutputStream;
5151

5252
use serde::{Deserialize, Serialize};
@@ -343,7 +343,7 @@ where
343343
/// to understand how to store and use the sketches generated by this function.
344344
/// Note: this serialization function doesn't support the sparse format as defined in Zetasketch mostly because
345345
/// this HyperLogLogPlusPlus implementation doesn't support it.
346-
#[cfg(feature = "ser-proto")]
346+
#[cfg(feature = "protobuf")]
347347
pub fn serialize_as_proto(&self) -> Vec<u8> {
348348
let mut buf = Vec::new();
349349
let mut stream = CodedOutputStream::new(&mut buf);
@@ -396,7 +396,7 @@ where
396396
buf
397397
}
398398

399-
#[cfg(feature = "ser-proto")]
399+
#[cfg(feature = "protobuf")]
400400
fn serialized_hll_size(&self) -> usize {
401401
let mut size = 0_usize;
402402

@@ -729,7 +729,7 @@ mod test {
729729
}
730730

731731
#[test]
732-
#[cfg(feature = "ser-proto")]
732+
#[cfg(feature = "protobuf")]
733733
fn hyperloglog_test_proto() {
734734
let p = 0.05;
735735
let mut hll = HyperLogLog::new(p);

amadeus-streaming/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ mod sort;
6565
mod top;
6666
mod traits;
6767

68-
#[cfg(feature = "ser-proto")]
68+
#[cfg(feature = "protobuf")]
6969
mod proto_util;
7070

7171
pub use count_min::*;

0 commit comments

Comments
 (0)