Skip to content

Commit 9cd995a

Browse files
committed
Rename DisplayHandle convenience methods
To have a consistent naming scheme.
1 parent 49855ba commit 9cd995a

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- **Breaking:** Remove deprecated `HasRawWindowHandle` and `HasRawDisplayHandle` traits.
88
- **Breaking:** Remove `UiKitWindowHandle::ui_view_controller` field, retrieve this from the UIView's responder chain instead.
99
- **Breaking:** Rename `Web*` handles to `WasmBindgen*`, to make it clearer that these are specific to `wasm-bindgen`.
10+
- **Breaking:** Rename `DisplayHandle` helpers `appkit` and `uikit` to `app_kit` and `ui_kit` respectively for consistency.
1011
* Improve documentation on AppKit and UIKit handles.
1112

1213
## 0.6.2 (2024-05-17)

src/appkit.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ impl DisplayHandle<'static> {
4747
/// ```
4848
/// # use raw_window_handle::{DisplayHandle, HasDisplayHandle};
4949
/// # fn do_something(rwh: impl HasDisplayHandle) { let _ = rwh; }
50-
/// let handle = DisplayHandle::appkit();
50+
/// let handle = DisplayHandle::app_kit();
5151
/// do_something(handle);
5252
/// ```
53-
pub fn appkit() -> Self {
53+
pub fn app_kit() -> Self {
5454
// SAFETY: No data is borrowed.
5555
unsafe { Self::borrow_raw(AppKitDisplayHandle::new().into()) }
5656
}

src/uikit.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ impl DisplayHandle<'static> {
4747
/// ```
4848
/// # use raw_window_handle::{DisplayHandle, HasDisplayHandle};
4949
/// # fn do_something(rwh: impl HasDisplayHandle) { let _ = rwh; }
50-
/// let handle = DisplayHandle::uikit();
50+
/// let handle = DisplayHandle::ui_kit();
5151
/// do_something(handle);
5252
/// ```
53-
pub fn uikit() -> Self {
53+
pub fn ui_kit() -> Self {
5454
// SAFETY: No data is borrowed.
5555
unsafe { Self::borrow_raw(UiKitDisplayHandle::new().into()) }
5656
}

0 commit comments

Comments
 (0)