Skip to content

Commit 3ff7cc2

Browse files
docs: Fix various markdown issues. (#639)
1 parent c4f4ad2 commit 3ff7cc2

File tree

10 files changed

+21
-20
lines changed

10 files changed

+21
-20
lines changed

clippy.toml

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

cocoa/src/macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/// Creates a Cocoa delegate to use e.g. with `NSWindow.setDelegate_`.
1111
/// Adds instance variables and methods to the definition.
1212
///
13-
/// # Example with NSWindowDelegate
13+
/// # Example with `NSWindowDelegate`
1414
/// ``` no_run
1515
/// #[macro_use] extern crate cocoa;
1616
/// #[macro_use] extern crate objc;

core-foundation/src/base.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ pub trait TCFType {
158158
/// The reference type wrapped inside this type.
159159
type Ref: TCFTypeRef;
160160

161-
/// Returns the object as its concrete TypeRef.
161+
/// Returns the object as its concrete `TypeRef`.
162162
fn as_concrete_TypeRef(&self) -> Self::Ref;
163163

164164
/// Returns an instance of the object, wrapping the underlying `CFTypeRef` subclass. Use this
@@ -211,7 +211,7 @@ pub trait TCFType {
211211
unsafe { CFShow(self.as_CFTypeRef()) }
212212
}
213213

214-
/// Returns true if this value is an instance of another type.
214+
/// Returns `true` if this value is an instance of another type.
215215
#[inline]
216216
fn instance_of<OtherCFType: TCFType>(&self) -> bool {
217217
self.type_of() == OtherCFType::type_id()
@@ -303,7 +303,7 @@ impl<'a, T: PartialEq> PartialEq for ItemMutRef<'a, T> {
303303
}
304304
}
305305

306-
/// A trait describing how to convert from the stored *mut c_void to the desired T
306+
/// A trait describing how to convert from the stored `*mut c_void` to the desired `T`
307307
pub unsafe trait FromMutVoid {
308308
unsafe fn from_mut_void<'a>(x: *mut c_void) -> ItemMutRef<'a, Self>
309309
where
@@ -331,7 +331,7 @@ unsafe impl<T: TCFType> FromMutVoid for T {
331331
}
332332
}
333333

334-
/// A trait describing how to convert from the stored *const c_void to the desired T
334+
/// A trait describing how to convert from the stored `*const c_void` to the desired `T`
335335
pub unsafe trait FromVoid {
336336
unsafe fn from_void<'a>(x: *const c_void) -> ItemRef<'a, Self>
337337
where
@@ -361,7 +361,7 @@ unsafe impl<T: TCFType> FromVoid for T {
361361
}
362362
}
363363

364-
/// A trait describing how to convert from the stored *const c_void to the desired T
364+
/// A trait describing how to convert from the stored `*const c_void` to the desired `T`
365365
pub unsafe trait ToVoid<T> {
366366
fn to_void(&self) -> *const c_void;
367367
}

core-foundation/src/data.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ impl_TCFType!(CFData, CFDataRef, CFDataGetTypeID);
2626
impl_CFTypeDescription!(CFData);
2727

2828
impl CFData {
29-
/// Creates a CFData around a copy `buffer`
29+
/// Creates a [`CFData`] around a copy `buffer`
3030
pub fn from_buffer(buffer: &[u8]) -> CFData {
3131
unsafe {
3232
let data_ref = CFDataCreate(
@@ -38,7 +38,7 @@ impl CFData {
3838
}
3939
}
4040

41-
/// Creates a CFData referencing `buffer` without creating a copy
41+
/// Creates a [`CFData`] referencing `buffer` without creating a copy
4242
pub fn from_arc<T: AsRef<[u8]> + Sync + Send>(buffer: Arc<T>) -> Self {
4343
use crate::base::{CFAllocator, CFAllocatorContext};
4444
use std::os::raw::c_void;

core-foundation/src/propertylist.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ impl CFPropertyList {
163163
unsafe { CFGetRetainCount(self.as_CFTypeRef()) }
164164
}
165165

166-
/// Returns the type ID of this object. Will be one of CFData, CFString, CFArray, CFDictionary,
167-
/// CFDate, CFBoolean, or CFNumber.
166+
/// Returns the type ID of this object. Will be one of `CFData`, `CFString`, `CFArray`,
167+
/// `CFDictionary`, `CFDate`, `CFBoolean`, or `CFNumber`.
168168
#[inline]
169169
pub fn type_of(&self) -> CFTypeID {
170170
unsafe { CFGetTypeID(self.as_CFTypeRef()) }
@@ -175,7 +175,7 @@ impl CFPropertyList {
175175
unsafe { CFShow(self.as_CFTypeRef()) }
176176
}
177177

178-
/// Returns true if this value is an instance of another type.
178+
/// Returns `true` if this value is an instance of another type.
179179
#[inline]
180180
pub fn instance_of<OtherCFType: TCFType>(&self) -> bool {
181181
self.type_of() == OtherCFType::type_id()

core-foundation/src/string.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ impl_TCFType!(CFString, CFStringRef, CFStringGetTypeID);
3030
impl FromStr for CFString {
3131
type Err = ();
3232

33-
/// See also CFString::new for a variant of this which does not return a Result
33+
/// See also [`CFString::new()`] for a variant of this which does not return a `Result`.
3434
#[inline]
3535
fn from_str(string: &str) -> Result<CFString, ()> {
3636
Ok(CFString::new(string))

core-foundation/src/timezone.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ impl CFTimeZone {
6767
CFTimeZone::new(offset.local_minus_utc() as f64)
6868
}
6969

70-
/// The timezone database ID that identifies the time zone. E.g. "America/Los_Angeles" or
71-
/// "Europe/Paris".
70+
/// The timezone database ID that identifies the time zone. E.g. `"America/Los_Angeles" `or
71+
/// `"Europe/Paris"`.
7272
pub fn name(&self) -> CFString {
7373
unsafe { CFString::wrap_under_get_rule(CFTimeZoneGetName(self.0)) }
7474
}

core-graphics/src/access.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ impl ScreenCaptureAccess {
1111
unsafe { CGRequestScreenCaptureAccess() == 1 }
1212
}
1313

14-
/// Return true if has access
14+
/// Return `true` if has access
1515
#[inline]
1616
pub fn preflight(&self) -> bool {
1717
unsafe { CGPreflightScreenCaptureAccess() == 1 }

core-graphics/src/data_provider.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ impl CGDataProviderRef {
106106
/// Encapsulates custom data that can be wrapped.
107107
pub trait CustomData {
108108
/// Returns a pointer to the start of the custom data. This pointer *must not change* during
109-
/// the lifespan of this CustomData.
109+
/// the lifespan of this `CustomData`.
110110
unsafe fn ptr(&self) -> *const u8;
111111
/// Returns the length of this custom data. This value must not change during the lifespan of
112-
/// this CustomData.
112+
/// this `CustomData`.
113113
unsafe fn len(&self) -> usize;
114114
}
115115

core-graphics/src/event.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ impl EventField {
177177
pub const MOUSE_EVENT_INSTANT_MOUSER: CGEventField = 6;
178178

179179
/// Key to access an integer field that encodes the mouse event subtype as
180-
/// a `kCFNumberIntType'.
180+
/// a `kCFNumberIntType`.
181181
pub const MOUSE_EVENT_SUB_TYPE: CGEventField = 7;
182182

183183
/// Key to access an integer field, non-zero when this is an autorepeat of
@@ -208,15 +208,15 @@ impl EventField {
208208
/// since the last scrolling event from a Mighty Mouse scroller or a
209209
/// single-wheel mouse scroller. The scrolling data uses a fixed-point
210210
/// 16.16 signed integer format. If this key is passed to
211-
/// `CGEventGetDoubleValueField', the fixed-point value is converted to a
211+
/// `CGEventGetDoubleValueField`, the fixed-point value is converted to a
212212
/// double value.
213213
pub const SCROLL_WHEEL_EVENT_FIXED_POINT_DELTA_AXIS_1: CGEventField = 93;
214214

215215
/// Key to access a field that contains scrolling data. The scrolling data
216216
/// represents a line-based or pixel-based change in horizontal position
217217
/// since the last scrolling event from a Mighty Mouse scroller. The
218218
/// scrolling data uses a fixed-point 16.16 signed integer format. If this
219-
/// key is passed to `CGEventGetDoubleValueField', the fixed-point value is
219+
/// key is passed to `CGEventGetDoubleValueField`, the fixed-point value is
220220
/// converted to a double value.
221221
pub const SCROLL_WHEEL_EVENT_FIXED_POINT_DELTA_AXIS_2: CGEventField = 94;
222222

0 commit comments

Comments
 (0)