Skip to content

Commit 1413ff4

Browse files
committed
docs: Remove footnotes from documentation comments
Replace footnotes with links to suppress `rustdoc::unportable-markdown` lint warnings.
1 parent 5469897 commit 1413ff4

File tree

2 files changed

+16
-24
lines changed

2 files changed

+16
-24
lines changed

src/file_time/convert.rs

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ impl TryFrom<FileTime> for i64 {
3838

3939
/// Converts a `FileTime` to the file time.
4040
///
41-
/// The file time may be represented as an [`i64`] value in [WinRT],[^clock]
42-
/// [.NET],[^fromfiletime][^tofiletime] etc.
41+
/// The file time is sometimes represented as an [`i64`] value, such as the
42+
/// [`winrt::clock`] struct in [WinRT], or the [`DateTime.FromFileTime`]
43+
/// method and the [`DateTime.ToFileTime`] method in [.NET].
4344
///
4445
/// # Errors
4546
///
@@ -62,13 +63,10 @@ impl TryFrom<FileTime> for i64 {
6263
/// assert!(i64::try_from(FileTime::MAX).is_err());
6364
/// ```
6465
///
65-
/// [^clock]: <https://learn.microsoft.com/en-us/uwp/cpp-ref-for-winrt/clock>
66-
///
67-
/// [^fromfiletime]: <https://learn.microsoft.com/en-us/dotnet/api/system.datetime.fromfiletime>
68-
///
69-
/// [^tofiletime]: <https://learn.microsoft.com/en-us/dotnet/api/system.datetime.tofiletime>
70-
///
66+
/// [`winrt::clock`]: https://learn.microsoft.com/en-us/uwp/cpp-ref-for-winrt/clock
7167
/// [WinRT]: https://learn.microsoft.com/en-us/windows/uwp/cpp-and-winrt-apis/
68+
/// [`DateTime.FromFileTime`]: https://learn.microsoft.com/en-us/dotnet/api/system.datetime.fromfiletime
69+
/// [`DateTime.ToFileTime`]: https://learn.microsoft.com/en-us/dotnet/api/system.datetime.tofiletime
7270
/// [.NET]: https://dotnet.microsoft.com/
7371
#[inline]
7472
fn try_from(ft: FileTime) -> Result<Self, Self::Error> {
@@ -238,8 +236,9 @@ impl TryFrom<i64> for FileTime {
238236

239237
/// Converts the file time to a `FileTime`.
240238
///
241-
/// The file time may be represented as an [`i64`] value in [WinRT],[^clock]
242-
/// [.NET],[^fromfiletime][^tofiletime] etc.
239+
/// The file time is sometimes represented as an [`i64`] value, such as the
240+
/// [`winrt::clock`] struct in [WinRT], or the [`DateTime.FromFileTime`]
241+
/// method and the [`DateTime.ToFileTime`] method in [.NET].
243242
///
244243
/// # Errors
245244
///
@@ -262,13 +261,10 @@ impl TryFrom<i64> for FileTime {
262261
/// assert!(FileTime::try_from(i64::MIN).is_err());
263262
/// ```
264263
///
265-
/// [^clock]: <https://learn.microsoft.com/en-us/uwp/cpp-ref-for-winrt/clock>
266-
///
267-
/// [^fromfiletime]: <https://learn.microsoft.com/en-us/dotnet/api/system.datetime.fromfiletime>
268-
///
269-
/// [^tofiletime]: <https://learn.microsoft.com/en-us/dotnet/api/system.datetime.tofiletime>
270-
///
264+
/// [`winrt::clock`]: https://learn.microsoft.com/en-us/uwp/cpp-ref-for-winrt/clock
271265
/// [WinRT]: https://learn.microsoft.com/en-us/windows/uwp/cpp-and-winrt-apis/
266+
/// [`DateTime.FromFileTime`]: https://learn.microsoft.com/en-us/dotnet/api/system.datetime.fromfiletime
267+
/// [`DateTime.ToFileTime`]: https://learn.microsoft.com/en-us/dotnet/api/system.datetime.tofiletime
272268
/// [.NET]: https://dotnet.microsoft.com/
273269
#[inline]
274270
fn try_from(ft: i64) -> Result<Self, Self::Error> {

src/file_time/dos_date_time.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ impl FileTime {
3838
///
3939
/// # Panics
4040
///
41-
/// Panics if `offset` is not in the range "UTC-16:00" to
42-
/// "UTC+15:45".[^offsetfromutc-field]
41+
/// Panics if `offset` is out of range for the [OffsetFromUtc field].
4342
///
4443
/// # Examples
4544
///
@@ -109,14 +108,13 @@ impl FileTime {
109108
/// );
110109
/// ```
111110
///
112-
/// [^offsetfromutc-field]: <https://learn.microsoft.com/en-us/windows/win32/fileio/exfat-specification#74101-offsetfromutc-field>
113-
///
114111
/// [MS-DOS date and time]: https://learn.microsoft.com/en-us/windows/win32/sysinfo/ms-dos-date-and-time
115112
/// [FAT]: https://en.wikipedia.org/wiki/File_Allocation_Table
116113
/// [exFAT]: https://en.wikipedia.org/wiki/ExFAT
117114
/// [ZIP]: https://en.wikipedia.org/wiki/ZIP_(file_format)
118115
/// [finer resolution]: https://learn.microsoft.com/en-us/windows/win32/fileio/exfat-specification#749-10msincrement-fields
119116
/// [UTC offset]: https://learn.microsoft.com/en-us/windows/win32/fileio/exfat-specification#7410-utcoffset-fields
117+
/// [OffsetFromUtc field]: https://learn.microsoft.com/en-us/windows/win32/fileio/exfat-specification#74101-offsetfromutc-field
120118
pub fn to_dos_date_time(
121119
self,
122120
offset: Option<UtcOffset>,
@@ -184,8 +182,7 @@ impl FileTime {
184182
/// Panics if any of the following are true:
185183
///
186184
/// - `resolution` is greater than 199.
187-
/// - `offset` is not in the range "UTC-16:00" to
188-
/// "UTC+15:45".[^offsetfromutc-field]
185+
/// - `offset` is out of range for the [OffsetFromUtc field].
189186
///
190187
/// # Examples
191188
///
@@ -247,13 +244,12 @@ impl FileTime {
247244
/// let _: FileTime = FileTime::from_dos_date_time(0x0021, u16::MIN, Some(200), None).unwrap();
248245
/// ```
249246
///
250-
/// [^offsetfromutc-field]: <https://learn.microsoft.com/en-us/windows/win32/fileio/exfat-specification#74101-offsetfromutc-field>
251-
///
252247
/// [MS-DOS date and time]: https://learn.microsoft.com/en-us/windows/win32/sysinfo/ms-dos-date-and-time
253248
/// [FAT]: https://en.wikipedia.org/wiki/File_Allocation_Table
254249
/// [exFAT]: https://en.wikipedia.org/wiki/ExFAT
255250
/// [ZIP]: https://en.wikipedia.org/wiki/ZIP_(file_format)
256251
/// [finer resolution]: https://learn.microsoft.com/en-us/windows/win32/fileio/exfat-specification#749-10msincrement-fields
252+
/// [OffsetFromUtc field]: https://learn.microsoft.com/en-us/windows/win32/fileio/exfat-specification#74101-offsetfromutc-field
257253
/// [UTC offset]: https://learn.microsoft.com/en-us/windows/win32/fileio/exfat-specification#7410-utcoffset-fields
258254
pub fn from_dos_date_time(
259255
date: u16,

0 commit comments

Comments
 (0)