Skip to content

Commit

Permalink
rust/shed/hostname: rename hostname dependency to unbreak doctests
Browse files Browse the repository at this point in the history
Summary: With the update from rustc 1.44 to 1.47 the doctests started to break when building a crate that depends on a different crate of the same name, see this: rust-lang/cargo#6819

Differential Revision: D24390815

fbshipit-source-id: 19b06e7f8d011da8f213c8e82de98d88d1cd0dd4
  • Loading branch information
lukaspiatkowski authored and facebook-github-bot committed Oct 19, 2020
1 parent 3d182ce commit 1064ed3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion shed/hostname/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ include = ["src/**/*.rs"]

[dependencies]
anyhow = "1.0"
hostname = "0.3"
hostname_orig = { package = "hostname", version = "0.3" }
4 changes: 2 additions & 2 deletions shed/hostname/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ use anyhow::Result;
pub fn get_hostname() -> Result<String> {
#[cfg(not(fbcode_build))]
{
Ok(::hostname::get()?.to_string_lossy().into_owned())
Ok(::hostname_orig::get()?.to_string_lossy().into_owned())
}

#[cfg(fbcode_build)]
{
use hostname as _; // used in oss
use hostname_orig as _; // used in oss

fbwhoami::FbWhoAmI::get()?
.name
Expand Down

0 comments on commit 1064ed3

Please sign in to comment.