##// 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:

r50533:5844cd8e default
r51872:4c5f6e95 default
Show More
Cargo.toml
19 lines | 404 B | text/plain | TOMLLexer
Georges Racinet
rust-cpython: start cpython crate bindings...
r41001 [package]
name = "hg-cpython"
version = "0.1.0"
authors = ["Georges Racinet <gracinet@anybox.fr>"]
Raphaël Gomès
rust: move all crates in the main workspace to edition 2021...
r50524 edition = "2021"
Georges Racinet
rust-cpython: start cpython crate bindings...
r41001
[lib]
name='rusthg'
crate-type = ["cdylib"]
[dependencies]
Raphaël Gomès
hg-cpython: upgrade dependencies...
r50533 cpython = { version = "0.7.1", features = ["extension-module"] }
crossbeam-channel = "0.5.6"
Raphaël Gomès
rust-re2: add wrapper for calling Re2 from Rust...
r44786 hg-core = { path = "../hg-core"}
Raphaël Gomès
hg-cpython: upgrade dependencies...
r50533 libc = "0.2.137"
log = "0.4.17"
env_logger = "0.9.3"
Simon Sapin
rust: Make OwningDirstateMap generic and move it into hg-core...
r48766 stable_deref_trait = "1.2.0"
pacien
rust: add vcsgraph crate as dependency...
r49348 vcsgraph = "0.2.0"