Skip to content

Commit

Permalink
Use inline platform branches
Browse files Browse the repository at this point in the history
Signed-off-by: James Sturtevant <jstur@microsoft.com>
  • Loading branch information
jsturtevant committed Jun 22, 2023
1 parent b979559 commit 38545a7
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions crates/shim/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,12 @@ pub fn socket_address(socket_path: &str, namespace: &str, id: &str) -> String {
hasher.finish()
};

#[cfg(unix)]
{
if cfg!(unix) {
format!("unix://{}/{:x}.sock", SOCKET_ROOT, hash)
}

#[cfg(windows)]
{
} else if cfg!(windows) {
format!(r"\\.\pipe\containerd-shim-{}-pipe", hash)
} else {
panic!("unsupported platform")
}
}

Expand Down

0 comments on commit 38545a7

Please sign in to comment.