lkml.org 
[lkml]   [2022]   [Dec]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 6/7] rust: sync: introduce `UniqueArc`
On Tue, 27 Dec 2022 23:19:52 -0800
Laine Taffin Altman <alexanderaltman@me.com> wrote:

> > +impl<T: ?Sized> From<UniqueArc<T>> for Pin<UniqueArc<T>> {
> > + fn from(obj: UniqueArc<T>) -> Self {
> > + // SAFETY: It is not possible to move/replace `T` inside a `Pin<UniqueArc<T>>` (unless `T`
>
> Minor nit: `Pin<UniqueArc<T>>` in this comment should just be `UniqueArc<T>`.

No, the current comment is correct. It's possible to move `T` inside
`UniqueArc<T>` (because it implements `DerefMut`).

Best,
Gary Guo

\
 
 \ /
  Last update: 2023-03-26 23:24    [W:0.123 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site