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