Skip to content

Commit 6610aaa

Browse files
Fix clippy::doc_markdown lints. (#705)
1 parent 743b793 commit 6610aaa

File tree

4 files changed

+26
-18
lines changed

4 files changed

+26
-18
lines changed

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ license = "MIT OR Apache-2.0"
88
repository = "https://github.com/servo/core-foundation-rs"
99
rust-version = "1.65"
1010

11-
# TODO: Remove most of these by fixing the actual issues.
1211
[workspace.lints]
12+
clippy.doc_markdown = "warn"
13+
14+
# TODO: Remove most of these by fixing the actual issues.
1315
clippy.assertions_on_constants = "allow"
1416
clippy.len_without_is_empty = "allow"
1517
clippy.manual_range_contains = "allow"

clippy.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
doc-valid-idents = ["CoreFoundation", ".."]
1+
doc-valid-idents = ["ACEScg", "CoreFoundation", ".."]

core-graphics/src/event.rs

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -677,10 +677,12 @@ impl CGEvent {
677677

678678
#[cfg_attr(feature = "link", link(name = "CoreGraphics", kind = "framework"))]
679679
extern "C" {
680-
/// Return the type identifier for the opaque type `CGEventRef'.
680+
/// Return the type identifier for the opaque type [`CGEventRef`].
681+
///
682+
/// [`CGEventRef`]: crate::sys::CGEventRef
681683
fn CGEventGetTypeID() -> CFTypeID;
682684

683-
/// Return a new event using the event source `source'. If `source' is NULL,
685+
/// Return a new event using the event source `source`. If `source` is NULL,
684686
/// the default source is used.
685687
fn CGEventCreate(source: crate::sys::CGEventSourceRef) -> crate::sys::CGEventRef;
686688

@@ -703,11 +705,11 @@ extern "C" {
703705
/// Return a new mouse event.
704706
///
705707
/// The event source may be taken from another event, or may be NULL.
706-
/// `mouseType' should be one of the mouse event types. `mouseCursorPosition'
708+
/// `mouseType` should be one of the mouse event types. `mouseCursorPosition`
707709
/// should be the position of the mouse cursor in global coordinates.
708-
/// `mouseButton' should be the button that's changing state; `mouseButton'
709-
/// is ignored unless `mouseType' is one of `kCGEventOtherMouseDown',
710-
/// `kCGEventOtherMouseDragged', or `kCGEventOtherMouseUp'.
710+
/// `mouseButton` should be the button that's changing state; `mouseButton`
711+
/// is ignored unless `mouseType` is one of `kCGEventOtherMouseDown`,
712+
/// `kCGEventOtherMouseDragged`, or `kCGEventOtherMouseUp`.
711713
///
712714
/// The current implementation of the event system supports a maximum of
713715
/// thirty-two buttons. Mouse button 0 is the primary button on the mouse.
@@ -720,7 +722,7 @@ extern "C" {
720722
mouseButton: CGMouseButton,
721723
) -> crate::sys::CGEventRef;
722724

723-
/// A non-variadic variant version of CGEventCreateScrollWheelEvent.
725+
/// A non-variadic variant version of [`CGEventCreateScrollWheelEvent`].
724726
///
725727
/// Returns a new Quartz scrolling event.
726728
///
@@ -756,7 +758,9 @@ extern "C" {
756758
fn CGEventGetFlags(event: crate::sys::CGEventRef) -> CGEventFlags;
757759

758760
/// Return the location of an event in global display coordinates.
759-
/// CGPointZero is returned if event is not a valid crate::sys::CGEventRef.
761+
/// `CGPointZero` is returned if event is not a valid [`CGEventRef`].
762+
///
763+
/// [`CGEventRef`]: crate::sys::CGEventRef
760764
fn CGEventGetLocation(event: crate::sys::CGEventRef) -> CGPoint;
761765

762766
/// Set the event type of an event.
@@ -785,13 +789,13 @@ extern "C" {
785789
/// Set the integer value of a field in an event.
786790
///
787791
/// Before calling this function, the event type must be set using a typed
788-
/// event creation function such as `CGEventCreateMouseEvent', or by
789-
/// calling `CGEventSetType'.
792+
/// event creation function such as [`CGEventCreateMouseEvent`], or by
793+
/// calling [`CGEventSetType`].
790794
///
791795
/// If you are creating a mouse event generated by a tablet, call this
792-
/// function and specify the field `kCGMouseEventSubtype' with a value of
793-
/// `kCGEventMouseSubtypeTabletPoint' or
794-
/// `kCGEventMouseSubtypeTabletProximity' before setting other parameters.
796+
/// function and specify the field `kCGMouseEventSubtype` with a value of
797+
/// `kCGEventMouseSubtypeTabletPoint` or
798+
/// `kCGEventMouseSubtypeTabletProximity` before setting other parameters.
795799
fn CGEventSetIntegerValueField(event: crate::sys::CGEventRef, field: CGEventField, value: i64);
796800

797801
/// Return the floating-point value of a field in an event.
@@ -804,8 +808,8 @@ extern "C" {
804808
/// Set the floating-point value of a field in an event.
805809
///
806810
/// Before calling this function, the event type must be set using a typed
807-
/// event creation function such as `CGEventCreateMouseEvent', or by calling
808-
/// `CGEventSetType'.
811+
/// event creation function such as [`CGEventCreateMouseEvent`], or by calling
812+
/// [`CGEventSetType`].
809813
///
810814
/// In cases where the field’s value is represented within the event by a
811815
/// fixed point number or integer, the value parameter is scaled as needed

core-graphics/src/event_source.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ impl CGEventSource {
3838

3939
#[cfg_attr(feature = "link", link(name = "CoreGraphics", kind = "framework"))]
4040
extern "C" {
41-
/// Return the type identifier for the opaque type `CGEventSourceRef'.
41+
/// Return the type identifier for the opaque type [`CGEventSourceRef`].
42+
///
43+
/// [`CGEventSourceRef`]: crate::sys::CGEventSourceRef
4244
fn CGEventSourceGetTypeID() -> CFTypeID;
4345

4446
/// Return a Quartz event source created with a specified source state.

0 commit comments

Comments
 (0)