Skip to content

Commit 2a5cb8b

Browse files
authored
Switch to serde's derive feature, update Rust to 2021 (#585)
Signed-off-by: Moritz Hoffmann <[email protected]>
1 parent f54796a commit 2a5cb8b

File tree

13 files changed

+21
-14
lines changed

13 files changed

+21
-14
lines changed

Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ members = [
77
"timely",
88
]
99

10+
resolver = "2"
11+
12+
[workspace.package]
13+
edition = "2021"
14+
1015
[profile.release]
1116
opt-level = 3
1217
debug = true

communication/Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "timely_communication"
33
version = "0.12.0"
44
authors = ["Frank McSherry <[email protected]>"]
55
description = "Communication layer for timely dataflow"
6-
edition = "2018"
6+
edition.workspace = true
77

88
# These URLs point to more information about the repository
99

@@ -20,8 +20,7 @@ default = ["getopts"]
2020
getopts = { version = "0.2.14", optional = true }
2121
bincode = { version = "1.0" }
2222
byteorder = "1.5"
23-
serde_derive = "1.0"
24-
serde = "1.0"
23+
serde = { version = "1.0", features = ["derive"] }
2524
timely_bytes = { path = "../bytes", version = "0.12" }
2625
timely_logging = { path = "../logging", version = "0.12" }
2726
crossbeam-channel = "0.5.0"

container/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[package]
22
name = "timely_container"
33
version = "0.12.0"
4-
edition = "2018"
54
description = "Container abstractions for Timely"
65
license = "MIT"
6+
edition.workspace = true
77

88
[dependencies]
99
columnation = { git = "https://github.com/frankmcsherry/columnation" }
1010
flatcontainer = "0.5"
11-
serde = { version = "1.0"}
11+
serde = { version = "1.0", features = ["derive"] }

logging/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
name = "timely_logging"
33
version = "0.12.0"
44
authors = ["Frank McSherry <[email protected]>"]
5-
edition = "2018"
6-
75
description = "Common timely logging infrastructure"
6+
edition.workspace = true
87

98
documentation = "https://docs.rs/timely/"
109
homepage = "https://github.com/TimelyDataflow/timely-dataflow"

timely/Cargo.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ name = "timely"
44
version = "0.12.0"
55
authors = ["Frank McSherry <[email protected]>"]
66
readme = "../README.md"
7-
edition = "2018"
8-
7+
edition.workspace = true
98
description = "A low-latency data-parallel dataflow system in Rust"
109

1110
# These URLs point to more information about the repository
@@ -22,8 +21,7 @@ getopts = ["getopts-dep", "timely_communication/getopts"]
2221
[dependencies]
2322
getopts-dep = { package = "getopts", version = "0.2.14", optional = true }
2423
bincode = { version = "1.0" }
25-
serde = "1.0"
26-
serde_derive = "1.0"
24+
serde = { version = "1.0", features = ["derive"] }
2725
timely_bytes = { path = "../bytes", version = "0.12" }
2826
timely_logging = { path = "../logging", version = "0.12" }
2927
timely_communication = { path = "../communication", version = "0.12", default-features = false }

timely/src/dataflow/channels/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//! Structured communication between timely dataflow operators.
22
3+
use serde::{Deserialize, Serialize};
34
use crate::communication::Push;
45
use crate::Container;
56

timely/src/dataflow/operators/core/capture/event.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
//! stream. There are two types of events, (i) the receipt of data and (ii) reports of progress
55
//! of timestamps.
66
7+
use serde::{Deserialize, Serialize};
8+
79
/// Data and progress events of the captured stream.
810
#[derive(Debug, Clone, Hash, Ord, PartialOrd, Eq, PartialEq, Deserialize, Serialize)]
911
pub enum Event<T, C> {

timely/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@
5858

5959
extern crate bincode;
6060
extern crate serde;
61-
#[macro_use]
62-
extern crate serde_derive;
6361
extern crate timely_communication;
6462
extern crate timely_bytes;
6563
extern crate timely_logging;

timely/src/logging.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ pub type TimelyLogger = Logger<TimelyEvent>;
1010
pub type TimelyProgressLogger = Logger<TimelyProgressEvent>;
1111

1212
use std::time::Duration;
13+
use serde::{Deserialize, Serialize};
1314
use crate::dataflow::operators::capture::{Event, EventPusher};
1415

1516
/// Logs events as a timely stream, with progress statements.
@@ -81,7 +82,7 @@ pub trait ProgressEventTimestamp: std::fmt::Debug + std::any::Any {
8182
/// # Example
8283
/// ```rust
8384
/// let ts = vec![(0usize, 0usize, (23u64, 10u64), -4i64), (0usize, 0usize, (23u64, 11u64), 1i64)];
84-
/// let ts: &timely::logging::ProgressEventTimestampVec = &ts;
85+
/// let ts: &dyn timely::logging::ProgressEventTimestampVec = &ts;
8586
/// for (n, p, t, d) in ts.iter() {
8687
/// print!("{:?}, ", (n, p, t.as_any().downcast_ref::<(u64, u64)>(), d));
8788
/// }

timely/src/order.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ pub use product::flatcontainer::ProductRegion as FlatProductRegion;
6161
/// A pair of timestamps, partially ordered by the product order.
6262
mod product {
6363
use std::fmt::{Formatter, Error, Debug};
64+
use serde::{Deserialize, Serialize};
6465

6566
use crate::container::columnation::{Columnation, Region};
6667
use crate::order::{Empty, TotalOrder};

0 commit comments

Comments
 (0)