@@ -814,9 +814,10 @@ pub fn write(fd: RawFd, buf: &[u8]) -> Result<usize> {
814814 Errno :: result ( res) . map ( |r| r as usize )
815815}
816816
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
820821#[ repr( i32 ) ]
821822pub enum Whence {
822823 /// Specify an offset relative to the start of the file.
@@ -847,7 +848,7 @@ pub enum Whence {
847848
848849/// Move the read/write file offset.
849850///
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)
851852pub fn lseek ( fd : RawFd , offset : libc:: off_t , whence : Whence ) -> Result < libc:: off_t > {
852853 let res = unsafe { libc:: lseek ( fd, offset, whence as i32 ) } ;
853854
@@ -1124,6 +1125,7 @@ pub fn getgroups() -> Result<Vec<Gid>> {
11241125/// specific user and group. For example, given the user `www-data` with UID
11251126/// `33` and the group `backup` with the GID `34`, one could switch the user as
11261127/// follows:
1128+ ///
11271129/// ```
11281130/// let uid = Uid::from_raw(33);
11291131/// let gid = Gid::from_raw(34);
@@ -1245,6 +1247,7 @@ pub fn getgrouplist(user: &CStr, group: Gid) -> Result<Vec<Gid>> {
12451247/// UID and GID for the user in the system's password database (usually found
12461248/// in `/etc/passwd`). If the `www-data` user's UID and GID were `33` and `33`,
12471249/// respectively, one could switch the user as follows:
1250+ ///
12481251/// ```
12491252/// let user = CString::new("www-data").unwrap();
12501253/// let uid = Uid::from_raw(33);
@@ -1280,7 +1283,7 @@ pub fn pause() -> Result<()> {
12801283
12811284/// Suspend execution for an interval of time
12821285///
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)
12841287// Per POSIX, does not fail
12851288#[ inline]
12861289pub fn sleep ( seconds : libc:: c_uint ) -> c_uint {
0 commit comments