@@ -814,9 +814,10 @@ pub fn write(fd: RawFd, buf: &[u8]) -> Result<usize> {
814
814
Errno :: result ( res) . map ( |r| r as usize )
815
815
}
816
816
817
- /// Directive that tells [`lseek`] and [`lseek64`] what the offset is relative to.
818
- /// [`lseek`]: ./fn.lseek.html
819
- /// [`lseek64`]: ./fn.lseek64.html
817
+ /// Directive that tells [`lseek`][1] and [`lseek64`][2] what the offset is relative to.
818
+ ///
819
+ /// [1]: ./fn.lseek.html
820
+ /// [2]: ./fn.lseek64.html
820
821
#[ repr( i32 ) ]
821
822
pub enum Whence {
822
823
/// Specify an offset relative to the start of the file.
@@ -847,7 +848,7 @@ pub enum Whence {
847
848
848
849
/// Move the read/write file offset.
849
850
///
850
- /// See also [lseek(2)(http://pubs.opengroup.org/onlinepubs/9699919799/functions/lseek.html)
851
+ /// See also [lseek(2)] (http://pubs.opengroup.org/onlinepubs/9699919799/functions/lseek.html)
851
852
pub fn lseek ( fd : RawFd , offset : libc:: off_t , whence : Whence ) -> Result < libc:: off_t > {
852
853
let res = unsafe { libc:: lseek ( fd, offset, whence as i32 ) } ;
853
854
@@ -1124,6 +1125,7 @@ pub fn getgroups() -> Result<Vec<Gid>> {
1124
1125
/// specific user and group. For example, given the user `www-data` with UID
1125
1126
/// `33` and the group `backup` with the GID `34`, one could switch the user as
1126
1127
/// follows:
1128
+ ///
1127
1129
/// ```
1128
1130
/// let uid = Uid::from_raw(33);
1129
1131
/// let gid = Gid::from_raw(34);
@@ -1245,6 +1247,7 @@ pub fn getgrouplist(user: &CStr, group: Gid) -> Result<Vec<Gid>> {
1245
1247
/// UID and GID for the user in the system's password database (usually found
1246
1248
/// in `/etc/passwd`). If the `www-data` user's UID and GID were `33` and `33`,
1247
1249
/// respectively, one could switch the user as follows:
1250
+ ///
1248
1251
/// ```
1249
1252
/// let user = CString::new("www-data").unwrap();
1250
1253
/// let uid = Uid::from_raw(33);
@@ -1280,7 +1283,7 @@ pub fn pause() -> Result<()> {
1280
1283
1281
1284
/// Suspend execution for an interval of time
1282
1285
///
1283
- /// See also [sleep(2)(http://pubs.opengroup.org/onlinepubs/009695399/functions/sleep.html#tag_03_705_05)
1286
+ /// See also [sleep(2)] (http://pubs.opengroup.org/onlinepubs/009695399/functions/sleep.html#tag_03_705_05)
1284
1287
// Per POSIX, does not fail
1285
1288
#[ inline]
1286
1289
pub fn sleep ( seconds : libc:: c_uint ) -> c_uint {
0 commit comments