Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clippy::doc_markdown lints. #705

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion clippy.toml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
doc-valid-idents = ["CoreFoundation", ".."]
doc-valid-idents = ["ACEScg", "CoreFoundation", ".."]
34 changes: 19 additions & 15 deletions core-graphics/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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.
Expand All @@ -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.
///
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand All @@ -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 field’s value is represented within the event by a
/// fixed point number or integer, the value parameter is scaled as needed
Expand Down
4 changes: 3 additions & 1 deletion core-graphics/src/event_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down