diff --git a/rust/hg-core/src/lib.rs b/rust/hg-core/src/lib.rs --- a/rust/hg-core/src/lib.rs +++ b/rust/hg-core/src/lib.rs @@ -26,11 +26,10 @@ pub mod operations; pub mod utils; -// Remove this to see (potential) non-artificial compile failures. MacOS -// *should* compile, but fail to compile tests for example as of 2020-03-06 -#[cfg(not(target_os = "linux"))] +// Remove this to see (potential) non-artificial compile failures. +#[cfg(not(any(target_os = "linux", target_os = "macos")))] compile_error!( - "`hg-core` has only been tested on Linux and will most \ + "`hg-core` has only been tested on Linux and macOS and will most \ likely not behave correctly on other platforms." ); diff --git a/rust/hg-cpython/src/dirstate/dirstate_map.rs b/rust/hg-cpython/src/dirstate/dirstate_map.rs --- a/rust/hg-cpython/src/dirstate/dirstate_map.rs +++ b/rust/hg-cpython/src/dirstate/dirstate_map.rs @@ -350,8 +350,8 @@ { dict.set_item( py, - key.as_bytes().to_vec(), - value.as_bytes().to_vec(), + PyBytes::new(py, key.as_bytes()).into_object(), + PyBytes::new(py, value.as_bytes()).into_object(), )?; } Ok(dict)