@@ -167,7 +167,7 @@ impl<T> RwLock<T> {
167
167
}
168
168
169
169
impl < T : ?Sized > RwLock < T > {
170
- /// Locks this rwlock with shared read access, blocking the current thread
170
+ /// Locks this `RwLock` with shared read access, blocking the current thread
171
171
/// until it can be acquired.
172
172
///
173
173
/// The calling thread will be blocked until there are no more writers which
@@ -181,9 +181,10 @@ impl<T: ?Sized> RwLock<T> {
181
181
///
182
182
/// # Errors
183
183
///
184
- /// This function will return an error if the RwLock is poisoned. An RwLock
185
- /// is poisoned whenever a writer panics while holding an exclusive lock.
186
- /// The failure will occur immediately after the lock has been acquired.
184
+ /// This function will return an error if the `RwLock` is poisoned. An
185
+ /// `RwLock` is poisoned whenever a writer panics while holding an exclusive
186
+ /// lock. The failure will occur immediately after the lock has been
187
+ /// acquired.
187
188
///
188
189
/// # Panics
189
190
///
@@ -215,7 +216,7 @@ impl<T: ?Sized> RwLock<T> {
215
216
}
216
217
}
217
218
218
- /// Attempts to acquire this rwlock with shared read access.
219
+ /// Attempts to acquire this `RwLock` with shared read access.
219
220
///
220
221
/// If the access could not be granted at this time, then `Err` is returned.
221
222
/// Otherwise, an RAII guard is returned which will release the shared access
@@ -228,13 +229,13 @@ impl<T: ?Sized> RwLock<T> {
228
229
///
229
230
/// # Errors
230
231
///
231
- /// This function will return the [`Poisoned`] error if the RwLock is poisoned.
232
- /// An RwLock is poisoned whenever a writer panics while holding an exclusive
233
- /// lock. `Poisoned` will only be returned if the lock would have otherwise been
234
- /// acquired.
232
+ /// This function will return the [`Poisoned`] error if the ` RwLock` is
233
+ /// poisoned. An ` RwLock` is poisoned whenever a writer panics while holding
234
+ /// an exclusive lock. `Poisoned` will only be returned if the lock would
235
+ /// have otherwise been acquired.
235
236
///
236
- /// This function will return the [`WouldBlock`] error if the RwLock could not
237
- /// be acquired because it was already locked exclusively.
237
+ /// This function will return the [`WouldBlock`] error if the ` RwLock` could
238
+ /// not be acquired because it was already locked exclusively.
238
239
///
239
240
/// [`Poisoned`]: TryLockError::Poisoned
240
241
/// [`WouldBlock`]: TryLockError::WouldBlock
@@ -263,20 +264,20 @@ impl<T: ?Sized> RwLock<T> {
263
264
}
264
265
}
265
266
266
- /// Locks this rwlock with exclusive write access, blocking the current
267
+ /// Locks this `RwLock` with exclusive write access, blocking the current
267
268
/// thread until it can be acquired.
268
269
///
269
270
/// This function will not return while other writers or other readers
270
271
/// currently have access to the lock.
271
272
///
272
- /// Returns an RAII guard which will drop the write access of this rwlock
273
+ /// Returns an RAII guard which will drop the write access of this `RwLock`
273
274
/// when dropped.
274
275
///
275
276
/// # Errors
276
277
///
277
- /// This function will return an error if the RwLock is poisoned. An RwLock
278
- /// is poisoned whenever a writer panics while holding an exclusive lock.
279
- /// An error will be returned when the lock is acquired.
278
+ /// This function will return an error if the ` RwLock` is poisoned. An
279
+ /// `RwLock` is poisoned whenever a writer panics while holding an exclusive
280
+ /// lock. An error will be returned when the lock is acquired.
280
281
///
281
282
/// # Panics
282
283
///
@@ -303,7 +304,7 @@ impl<T: ?Sized> RwLock<T> {
303
304
}
304
305
}
305
306
306
- /// Attempts to lock this rwlock with exclusive write access.
307
+ /// Attempts to lock this `RwLock` with exclusive write access.
307
308
///
308
309
/// If the lock could not be acquired at this time, then `Err` is returned.
309
310
/// Otherwise, an RAII guard is returned which will release the lock when
@@ -316,13 +317,13 @@ impl<T: ?Sized> RwLock<T> {
316
317
///
317
318
/// # Errors
318
319
///
319
- /// This function will return the [`Poisoned`] error if the RwLock is
320
- /// poisoned. An RwLock is poisoned whenever a writer panics while holding
321
- /// an exclusive lock. `Poisoned` will only be returned if the lock would have
322
- /// otherwise been acquired.
320
+ /// This function will return the [`Poisoned`] error if the ` RwLock` is
321
+ /// poisoned. An ` RwLock` is poisoned whenever a writer panics while holding
322
+ /// an exclusive lock. `Poisoned` will only be returned if the lock would
323
+ /// have otherwise been acquired.
323
324
///
324
- /// This function will return the [`WouldBlock`] error if the RwLock could not
325
- /// be acquired because it was already locked exclusively.
325
+ /// This function will return the [`WouldBlock`] error if the ` RwLock` could
326
+ /// not be acquired because it was already locked exclusively.
326
327
///
327
328
/// [`Poisoned`]: TryLockError::Poisoned
328
329
/// [`WouldBlock`]: TryLockError::WouldBlock
@@ -422,10 +423,10 @@ impl<T: ?Sized> RwLock<T> {
422
423
///
423
424
/// # Errors
424
425
///
425
- /// This function will return an error if the RwLock is poisoned. An RwLock
426
- /// is poisoned whenever a writer panics while holding an exclusive lock. An
427
- /// error will only be returned if the lock would have otherwise been
428
- /// acquired.
426
+ /// This function will return an error if the ` RwLock` is poisoned. An
427
+ /// `RwLock` is poisoned whenever a writer panics while holding an exclusive
428
+ /// lock. An error will only be returned if the lock would have otherwise
429
+ /// been acquired.
429
430
///
430
431
/// # Examples
431
432
///
@@ -455,10 +456,10 @@ impl<T: ?Sized> RwLock<T> {
455
456
///
456
457
/// # Errors
457
458
///
458
- /// This function will return an error if the RwLock is poisoned. An RwLock
459
- /// is poisoned whenever a writer panics while holding an exclusive lock. An
460
- /// error will only be returned if the lock would have otherwise been
461
- /// acquired.
459
+ /// This function will return an error if the ` RwLock` is poisoned. An
460
+ /// `RwLock` is poisoned whenever a writer panics while holding an exclusive
461
+ /// lock. An error will only be returned if the lock would have otherwise
462
+ /// been acquired.
462
463
///
463
464
/// # Examples
464
465
///
0 commit comments