Improve comment in create_jobserver_client

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2022-07-19 00:32:56 +10:00
parent fb0a6a5514
commit 072253ebae
No known key found for this signature in database
GPG key ID: 591C0B03040416D6

View file

@ -50,6 +50,8 @@ pub fn create_jobserver_client() -> Result<jobserver::Client, BinstallError> {
// Safety: // Safety:
// //
// Client::from_env is unsafe because from_raw_fd is unsafe. // Client::from_env is unsafe because from_raw_fd is unsafe.
// It doesn't do anything that is actually unsafe, like
// dereferencing pointer.
if let Some(client) = unsafe { Client::from_env() } { if let Some(client) = unsafe { Client::from_env() } {
Ok(client) Ok(client)
} else { } else {