Skip to content

Commit 63f910b

Browse files
authored
More into_ref_counted docs (#6407)
Followup from #6392 <!-- Thank you for your pull request to ICU4X! Reminder: try to use [Conventional Comments](https://conventionalcomments.org/) to make comments clearer. Please see https://github.com/unicode-org/icu4x/blob/main/CONTRIBUTING.md for general information on contributing to ICU4X. -->
1 parent 46718bb commit 63f910b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

components/calendar/src/date.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -349,23 +349,23 @@ impl<C: IntoAnyCalendar> Date<C> {
349349
}
350350

351351
impl<A: AsCalendar> Date<A> {
352-
/// Wrap the calendar type in `Rc<T>`
352+
/// Wrap the contained calendar type in `Rc<T>`, making it cheaper to clone.
353353
///
354354
/// Useful when paired with [`Self::to_any()`] to obtain a `Date<Rc<AnyCalendar>>`
355355
#[cfg(feature = "alloc")]
356356
pub fn into_ref_counted(self) -> Date<Rc<A>> {
357357
Date::from_raw(self.inner, Rc::new(self.calendar))
358358
}
359359

360-
/// Wrap the calendar type in `Arc<T>`
360+
/// Wrap the contained calendar type in `Arc<T>`, making it cheaper to clone in a thread-safe manner.
361361
///
362362
/// Useful when paired with [`Self::to_any()`] to obtain a `Date<Arc<AnyCalendar>>`
363363
#[cfg(feature = "alloc")]
364364
pub fn into_atomic_ref_counted(self) -> Date<Arc<A>> {
365365
Date::from_raw(self.inner, Arc::new(self.calendar))
366366
}
367367

368-
/// Wrap the calendar type in `Ref<T>`
368+
/// Wrap the calendar type in `Ref<T>`, making it cheaper to clone (by introducing a borrow)
369369
///
370370
/// Useful for converting a `&Date<C>` into an equivalent `Date<D>` without cloning
371371
/// the calendar.

0 commit comments

Comments
 (0)