Skip to content

Commit 8de849e

Browse files
committed
Improve consistence
1 parent abc0f94 commit 8de849e

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

library/alloc/src/collections/vec_deque/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3044,6 +3044,7 @@ impl<T, A: Allocator> From<Vec<T, A>> for VecDeque<T, A> {
30443044
/// [`Vec<T>`]: crate::vec::Vec
30453045
/// [`VecDeque<T>`]: crate::collections::VecDeque
30463046
///
3047+
/// ## Cost
30473048
/// This conversion is guaranteed to run in *O*(1) time
30483049
/// and to not re-allocate the `Vec`'s buffer or allocate
30493050
/// any additional memory.

library/core/src/ptr/non_null.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1652,6 +1652,7 @@ impl<T: ?Sized> hash::Hash for NonNull<T> {
16521652

16531653
#[unstable(feature = "ptr_internals", issue = "none")]
16541654
impl<T: ?Sized> From<Unique<T>> for NonNull<T> {
1655+
/// Return `Unique` casted to a `NonNull`.
16551656
#[inline]
16561657
fn from(unique: Unique<T>) -> Self {
16571658
unique.as_non_null_ptr()

library/std/src/sync/mpsc.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1148,6 +1148,7 @@ impl<T> From<SendError<T>> for TrySendError<T> {
11481148
///
11491149
/// This conversion always returns a `TrySendError::Disconnected` containing the data in the `SendError<T>`.
11501150
///
1151+
/// ## Cost
11511152
/// No data is allocated on the heap.
11521153
fn from(err: SendError<T>) -> TrySendError<T> {
11531154
match err {
@@ -1198,6 +1199,7 @@ impl From<RecvError> for TryRecvError {
11981199
///
11991200
/// This conversion always returns `TryRecvError::Disconnected`.
12001201
///
1202+
/// ## Cost
12011203
/// No data is allocated on the heap.
12021204
fn from(err: RecvError) -> TryRecvError {
12031205
match err {
@@ -1233,6 +1235,7 @@ impl From<RecvError> for RecvTimeoutError {
12331235
///
12341236
/// This conversion always returns `RecvTimeoutError::Disconnected`.
12351237
///
1238+
/// ## Cost
12361239
/// No data is allocated on the heap.
12371240
fn from(err: RecvError) -> RecvTimeoutError {
12381241
match err {

library/std/src/sync/poison.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ impl<T> PoisonError<T> {
340340

341341
#[stable(feature = "rust1", since = "1.0.0")]
342342
impl<T> From<PoisonError<T>> for TryLockError<T> {
343-
/// Wrap `PoisonError` in `Poisoned` variant.
343+
/// Wrap `PoisonError` in the `Poisoned` variant.
344344
fn from(err: PoisonError<T>) -> TryLockError<T> {
345345
TryLockError::Poisoned(err)
346346
}

0 commit comments

Comments
 (0)