##// END OF EJS Templates
rust: make `Revision` a newtype...
rust: make `Revision` a newtype This change is the one we've been building towards during this series. The aim is to make `Revision` mean more than a simple integer, holding the information that it is valid for a given revlog index. While this still allows for programmer error, since creating a revision directly and querying a different index with a "checked" revision are still possible, the friction created by the newtype will hopefully make us think twice about which type to use. Enough of the Rust ecosystem relies on the newtype pattern to be efficiently optimized away (even compiler in codegen testsĀ¹), so I'm not worried about this being a fundamental problem. [1] https://github.com/rust-lang/rust/blob/7a70647f195f6b0a0f1ebd72b1542ba91a32f43a/tests/codegen/vec-in-place.rs#L47

File last commit:

r45238:9fc9526e default
r51872:4c5f6e95 default
Show More
Cargo.toml
22 lines | 474 B | text/plain | TOMLLexer
Yuya Nishihara
rust-chg: add project skeleton...
r40003 [package]
name = "chg"
version = "0.1.0"
authors = ["Yuya Nishihara <yuya@tcha.org>"]
description = "Client for Mercurial command server with cHg extension"
license = "GPL-2.0+"
Yuya Nishihara
rust-chg: upgrade to 2018 edition and remove useless extern crates...
r45179 edition = "2018"
Yuya Nishihara
rust-chg: add project skeleton...
r40003
[dependencies]
Yuya Nishihara
rust-chg: upgrade to futures-0.3 based libraries...
r45231 async-trait = "0.1"
bytes = "0.5"
futures = "0.3"
Yuya Nishihara
rust-chg: add project skeleton...
r40003 libc = "0.2"
Yuya Nishihara
rust-chg: depend on log and tokio_timer...
r40323 log = { version = "0.4", features = ["std"] }
Yuya Nishihara
rust-chg: upgrade to futures-0.3 based libraries...
r45231 tokio-hglib = "0.3"
[dependencies.tokio]
version = "0.2"
features = ["rt-core", "io-util", "time", "process", "macros"]
Yuya Nishihara
rust-chg: add project skeleton...
r40003
[build-dependencies]
cc = "1.0"