Skip to content

Commit 80ab368

Browse files
committed
Metal: Misc non-unsafe translation fixes
1 parent 35ec315 commit 80ab368

File tree

4 files changed

+173
-10
lines changed

4 files changed

+173
-10
lines changed

crates/dispatch2/src/object.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ enum_with_val! {
4444
#[allow(missing_docs)] // TODO
4545
pub const QOS_MIN_RELATIVE_PRIORITY: i32 = -15;
4646

47-
/// Error returned by [DispatchObject::set_qos_class_floor].
47+
/// Error returned by [`DispatchObject::set_qos_class_floor()`].
4848
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
4949
#[non_exhaustive]
5050
pub enum QualityOfServiceClassFloorError {

framework-crates/objc2-metal/src/device.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
1-
use crate::MTLDevice;
21
use objc2::rc::Retained;
32
use objc2::runtime::ProtocolObject;
43
use objc2_foundation::NSArray;
54

5+
#[cfg(doc)]
6+
use crate::MTLCreateSystemDefaultDevice;
7+
use crate::MTLDevice;
8+
69
/// Returns all Metal devices in the system.
710
///
811
/// On macOS and macCatalyst, this API will not cause the system to switch
912
/// devices and leaves the decision about which GPU to use up to the
1013
/// application based on whatever criteria it deems appropriate.
1114
///
1215
/// On iOS, tvOS and visionOS, this API returns an array containing the same
13-
/// device that MTLCreateSystemDefaultDevice would have returned, or an empty
16+
/// device that [`MTLCreateSystemDefaultDevice()`] would have returned, or an empty
1417
/// array if it would have failed.
1518
#[inline]
1619
pub extern "C-unwind" fn MTLCopyAllDevices() -> Retained<NSArray<ProtocolObject<dyn MTLDevice>>> {

framework-crates/objc2-metal/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//!
1212
//! [apple-doc]: https://developer.apple.com/documentation/xcode/validating-your-apps-metal-api-usage/.
1313
//!
14-
//! NOTE: To use [`MTLCreateSystemDefaultDevice`] you need to link to
14+
//! NOTE: To use [`MTLCreateSystemDefaultDevice()`] you need to link to
1515
//! `CoreGraphics`, this can be done by using `objc2-core-graphics`, or by
1616
//! doing:
1717
//! ```rust

0 commit comments

Comments
 (0)