Merge pull request #1792 from ecton/surface-safety-docs

Document additional safety requirements of `Instance::create_surface`
This commit is contained in:
Connor Fitzgerald 2021-08-12 12:29:04 -04:00 committed by GitHub
commit f0520f8c54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1454,7 +1454,8 @@ impl Instance {
///
/// # Safety
///
/// - Raw Window Handle must be a valid object to create a surface upon.
/// - Raw Window Handle must be a valid object to create a surface upon and
/// must remain valid for the lifetime of the returned surface.
pub unsafe fn create_surface<W: raw_window_handle::HasRawWindowHandle>(
&self,
window: &W,