RHGitaly: proper version information
It was nice to use the purely stateless `ServerInfo` gRPC method (at least with the info that HGitaly provides) as a first example of an implementation using Tonic. Now it's time to provide the actual information, consistent with the Python implementation. We're using the `build_const` crate to inject the value at build time. This is actually importing from the `constants.rs` file in the relevant build `out/` directory. Also the `..Default::default()` syntax (taught us by clippy) allows to avoid starting from the defaults to mutate a few fields.
parent
9be2e5b3
No related branches found
No related tags found
Showing
- rust/Cargo.lock 7 additions, 0 deletionsrust/Cargo.lock
- rust/rhgitaly/Cargo.toml 3 additions, 1 deletionrust/rhgitaly/Cargo.toml
- rust/rhgitaly/build.rs 17 additions, 0 deletionsrust/rhgitaly/build.rs
- rust/rhgitaly/src/lib.rs 2 additions, 0 deletionsrust/rhgitaly/src/lib.rs
- rust/rhgitaly/src/service/server.rs 6 additions, 5 deletionsrust/rhgitaly/src/service/server.rs
Loading
Please register or sign in to comment