Fix clippy::doc_markdown lints. (#705)

This commit is contained in:
Bruce Mitchener
2024-08-14 09:16:33 +07:00
committed by GitHub
parent 743b793f75
commit 6610aaa1ff
4 changed files with 26 additions and 18 deletions
+3 -1
View File
@@ -8,8 +8,10 @@ license = "MIT OR Apache-2.0"
repository = "https://github.com/servo/core-foundation-rs"
rust-version = "1.65"
# TODO: Remove most of these by fixing the actual issues.
[workspace.lints]
clippy.doc_markdown = "warn"
# TODO: Remove most of these by fixing the actual issues.
clippy.assertions_on_constants = "allow"
clippy.len_without_is_empty = "allow"
clippy.manual_range_contains = "allow"
+1 -1
View File
@@ -1 +1 @@
doc-valid-idents = ["CoreFoundation", ".."]
doc-valid-idents = ["ACEScg", "CoreFoundation", ".."]
+19 -15
View File
@@ -677,10 +677,12 @@ impl CGEvent {
#[cfg_attr(feature = "link", link(name = "CoreGraphics", kind = "framework"))]
extern "C" {
/// Return the type identifier for the opaque type `CGEventRef'.
/// Return the type identifier for the opaque type [`CGEventRef`].
///
/// [`CGEventRef`]: crate::sys::CGEventRef
fn CGEventGetTypeID() -> CFTypeID;
/// Return a new event using the event source `source'. If `source' is NULL,
/// Return a new event using the event source `source`. If `source` is NULL,
/// the default source is used.
fn CGEventCreate(source: crate::sys::CGEventSourceRef) -> crate::sys::CGEventRef;
@@ -703,11 +705,11 @@ extern "C" {
/// Return a new mouse event.
///
/// The event source may be taken from another event, or may be NULL.
/// `mouseType' should be one of the mouse event types. `mouseCursorPosition'
/// `mouseType` should be one of the mouse event types. `mouseCursorPosition`
/// should be the position of the mouse cursor in global coordinates.
/// `mouseButton' should be the button that's changing state; `mouseButton'
/// is ignored unless `mouseType' is one of `kCGEventOtherMouseDown',
/// `kCGEventOtherMouseDragged', or `kCGEventOtherMouseUp'.
/// `mouseButton` should be the button that's changing state; `mouseButton`
/// is ignored unless `mouseType` is one of `kCGEventOtherMouseDown`,
/// `kCGEventOtherMouseDragged`, or `kCGEventOtherMouseUp`.
///
/// The current implementation of the event system supports a maximum of
/// thirty-two buttons. Mouse button 0 is the primary button on the mouse.
@@ -720,7 +722,7 @@ extern "C" {
mouseButton: CGMouseButton,
) -> crate::sys::CGEventRef;
/// A non-variadic variant version of CGEventCreateScrollWheelEvent.
/// A non-variadic variant version of [`CGEventCreateScrollWheelEvent`].
///
/// Returns a new Quartz scrolling event.
///
@@ -756,7 +758,9 @@ extern "C" {
fn CGEventGetFlags(event: crate::sys::CGEventRef) -> CGEventFlags;
/// Return the location of an event in global display coordinates.
/// CGPointZero is returned if event is not a valid crate::sys::CGEventRef.
/// `CGPointZero` is returned if event is not a valid [`CGEventRef`].
///
/// [`CGEventRef`]: crate::sys::CGEventRef
fn CGEventGetLocation(event: crate::sys::CGEventRef) -> CGPoint;
/// Set the event type of an event.
@@ -785,13 +789,13 @@ extern "C" {
/// Set the integer value of a field in an event.
///
/// Before calling this function, the event type must be set using a typed
/// event creation function such as `CGEventCreateMouseEvent', or by
/// calling `CGEventSetType'.
/// event creation function such as [`CGEventCreateMouseEvent`], or by
/// calling [`CGEventSetType`].
///
/// If you are creating a mouse event generated by a tablet, call this
/// function and specify the field `kCGMouseEventSubtype' with a value of
/// `kCGEventMouseSubtypeTabletPoint' or
/// `kCGEventMouseSubtypeTabletProximity' before setting other parameters.
/// function and specify the field `kCGMouseEventSubtype` with a value of
/// `kCGEventMouseSubtypeTabletPoint` or
/// `kCGEventMouseSubtypeTabletProximity` before setting other parameters.
fn CGEventSetIntegerValueField(event: crate::sys::CGEventRef, field: CGEventField, value: i64);
/// Return the floating-point value of a field in an event.
@@ -804,8 +808,8 @@ extern "C" {
/// Set the floating-point value of a field in an event.
///
/// Before calling this function, the event type must be set using a typed
/// event creation function such as `CGEventCreateMouseEvent', or by calling
/// `CGEventSetType'.
/// event creation function such as [`CGEventCreateMouseEvent`], or by calling
/// [`CGEventSetType`].
///
/// In cases where the fields value is represented within the event by a
/// fixed point number or integer, the value parameter is scaled as needed
+3 -1
View File
@@ -38,7 +38,9 @@ impl CGEventSource {
#[cfg_attr(feature = "link", link(name = "CoreGraphics", kind = "framework"))]
extern "C" {
/// Return the type identifier for the opaque type `CGEventSourceRef'.
/// Return the type identifier for the opaque type [`CGEventSourceRef`].
///
/// [`CGEventSourceRef`]: crate::sys::CGEventSourceRef
fn CGEventSourceGetTypeID() -> CFTypeID;
/// Return a Quartz event source created with a specified source state.