@@ -225,7 +225,7 @@ pub struct LocalFile {
225
225
}
226
226
227
227
// SAFETY: The type invariants guarantee that `LocalFile` is always ref-counted. This implementation
228
- // makes `ARef<File >` own a normal refcount.
228
+ // makes `ARef<LocalFile >` own a normal refcount.
229
229
unsafe impl AlwaysRefCounted for LocalFile {
230
230
#[ inline]
231
231
fn inc_ref ( & self ) {
@@ -236,7 +236,8 @@ unsafe impl AlwaysRefCounted for LocalFile {
236
236
#[ inline]
237
237
unsafe fn dec_ref ( obj : ptr:: NonNull < LocalFile > ) {
238
238
// SAFETY: To call this method, the caller passes us ownership of a normal refcount, so we
239
- // may drop it. The cast is okay since `File` has the same representation as `struct file`.
239
+ // may drop it. The cast is okay since `LocalFile` has the same representation as
240
+ // `struct file`.
240
241
unsafe { bindings:: fput ( obj. cast ( ) . as_ptr ( ) ) }
241
242
}
242
243
}
@@ -274,7 +275,7 @@ impl LocalFile {
274
275
#[ inline]
275
276
pub unsafe fn from_raw_file < ' a > ( ptr : * const bindings:: file ) -> & ' a LocalFile {
276
277
// SAFETY: The caller guarantees that the pointer is not dangling and stays valid for the
277
- // duration of 'a . The cast is okay because `File ` is `repr(transparent)`.
278
+ // duration of `'a` . The cast is okay because `LocalFile ` is `repr(transparent)`.
278
279
//
279
280
// INVARIANT: The caller guarantees that there are no problematic `fdget_pos` calls.
280
281
unsafe { & * ptr. cast ( ) }
@@ -348,7 +349,7 @@ impl File {
348
349
#[ inline]
349
350
pub unsafe fn from_raw_file < ' a > ( ptr : * const bindings:: file ) -> & ' a File {
350
351
// SAFETY: The caller guarantees that the pointer is not dangling and stays valid for the
351
- // duration of 'a . The cast is okay because `File` is `repr(transparent)`.
352
+ // duration of `'a` . The cast is okay because `File` is `repr(transparent)`.
352
353
//
353
354
// INVARIANT: The caller guarantees that there are no problematic `fdget_pos` calls.
354
355
unsafe { & * ptr. cast ( ) }
0 commit comments