Read about our upcoming Code of Conduct on this issue

This instance was upgraded to Heptapod 0.28.0 today

Commit cbb8c115 authored by Yuya Nishihara's avatar Yuya Nishihara
Browse files

rust-chg: add brief comment about initial capacity of temp_sock_path()

I don't know if it can be expressed as a compile-time constant, so it's
a comment for now.

About this series:
This is quite old patches for rust-chg. I heard from Octobus people that
there's a plan to do an experiment on merging hgcli + chg + some Rust?,
so I decided to respin the rust-chg series.

Maybe we'll rewrite the core to leverage the recent async/await functionality,
but I want to first make my old patches in so the rust-chg can be a drop-in
replacement for the chg of C. Compiler warnings will be removed later, and
the codebase will be upgraded to the 2018 edition later.

Differential Revision:
parent e7af56a0733e
......@@ -47,7 +47,7 @@ impl Locator {
/// Temporary socket path for this client process.
fn temp_sock_path(&self) -> PathBuf {
let src = self.base_sock_path.as_os_str().as_bytes();
let mut buf = Vec::with_capacity(src.len() + 6);
let mut buf = Vec::with_capacity(src.len() + 6); // "{src}.{pid}".len()
buf.extend_from_slice(format!(".{}", self.process_id).as_bytes());
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment