Skip to content

Commit 0ded999

Browse files
committed
Rustdoc syntax fixes
- Fix mismatched code blocks - Remove newline from link (revealed by rust-lang/rust#44229)
1 parent 5444415 commit 0ded999

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/base.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -411,11 +411,11 @@ impl AllUsers {
411411
/// `passwd` entries, are called in a thread-safe manner.
412412
///
413413
/// These functions [modify a global
414-
/// state](http://man7.org/linux/man-pages/man3/getpwent.3.html#
415-
/// ATTRIBUTES), and if any are used at the same time, the state could
416-
/// be reset, resulting in a data race. We cannot even place it behind
417-
/// an internal `Mutex`, as there is nothing stopping another `extern`
418-
/// function definition from calling it!
414+
/// state](http://man7.org/linux/man-pages/man3/getpwent.3.html#ATTRIBUTES),
415+
/// and if any are used at the same time, the state could be reset,
416+
/// resulting in a data race. We cannot even place it behind an internal
417+
/// `Mutex`, as there is nothing stopping another `extern` function
418+
/// definition from calling it!
419419
///
420420
/// So to iterate all users, construct the iterator inside an `unsafe`
421421
/// block, then make sure to not make a new instance of it until

src/cache.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
//! value. In this case, switching to `&mut self` would only allow for one user
2525
//! to be read at a time!
2626
//!
27-
//! ``norun
27+
//! ```norun
2828
//! let mut cache = UsersCache::empty_cache();
2929
//! let uid = cache.get_current_uid(); // OK...
3030
//! let user = cache.get_user_by_uid(uid).unwrap() // OK...
@@ -43,7 +43,7 @@
4343
//! we’re just trying the same trick as earlier. A simplified implementation of
4444
//! a user cache lookup would look something like this:
4545
//!
46-
//! ``norun
46+
//! ```norun
4747
//! fn get_user_by_uid(&self, uid: uid_t) -> Option<&User> {
4848
//! let users = self.users.borrow_mut();
4949
//! users.get(uid)

0 commit comments

Comments
 (0)