Skip to content

Commit 987c185

Browse files
FranciscoTGouveiadjc
authored andcommitted
fix(downloads): add a comment to justify the unwrap on .get() of OnceLock
1 parent 77206a9 commit 987c185

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/download/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,8 @@ mod reqwest_be {
649649
.map_err(DownloadError::Reqwest)?;
650650

651651
let _ = CLIENT_NATIVE_TLS.set(client);
652-
652+
// "The cell is guaranteed to contain a value when `set` returns, though not necessarily
653+
// the one provided."
653654
Ok(CLIENT_NATIVE_TLS.get().unwrap())
654655
}
655656

0 commit comments

Comments
 (0)