@@ -64,8 +64,7 @@ use cfg_if::cfg_if;
64
64
/// For instance, a valid progmem statics would be one, that is attributed with
65
65
/// `#[link_section = ".progmem.data"]`.
66
66
///
67
- /// Also general Rust pointer dereferencing constraints apply, i.e. it must not
68
- /// be dangling.
67
+ /// Also general Rust pointer dereferencing constraints apply (see [`core::ptr::read`]).
69
68
///
70
69
/// [`read_slice`]: fn.read_slice.html
71
70
/// [`read_value`]: fn.read_value.html
@@ -305,10 +304,7 @@ where
305
304
/// whether the `lpm-asm-loop` crate feature is set or not.
306
305
///
307
306
/// Notice that `T` might be also something like `[T, N]` so that in fact
308
- /// entire arrays can be loaded using this function. Alternatively if the the
309
- /// size of an array can not be known at compile time (i.e. a slice) there is
310
- /// also the [`read_slice`] function, but it requires proper
311
- /// initialization upfront.
307
+ /// entire arrays can be loaded using this function.
312
308
///
313
309
/// If you need to read just a single byte you might use [`read_byte`].
314
310
///
@@ -369,7 +365,7 @@ where
369
365
///
370
366
/// # Safety
371
367
///
372
- /// This call is analog to `core::ptr::copy` thus it
368
+ /// This call is analog to [ `core::ptr::copy`] thus it
373
369
/// has the same basic requirements such as the pointer must be valid for
374
370
/// dereferencing i.e. not dangling and the pointer must
375
371
/// be valid to read one entire value of type `T`,
@@ -379,7 +375,7 @@ where
379
375
/// domain.
380
376
///
381
377
/// While the alignment is not strictly required for AVR, the non-AVR fallback
382
- /// might be done actually use `core::ptr::copy` and therefore the pointers
378
+ /// might be actually using `core::ptr::copy` and therefore the pointers
383
379
/// must be aligned.
384
380
///
385
381
/// [`read_byte`]: fn.read_byte.html
@@ -391,7 +387,7 @@ where
391
387
T : Sized + Copy ,
392
388
{
393
389
// The use of an MaybeUninit allows us to correctly allocate the space
394
- // required to hold one `T`, whereas we correctly comunicate that it is
390
+ // required to hold one `T`, whereas we correctly communicate that it is
395
391
// uninitialized to the compiler.
396
392
//
397
393
// The alternative of using a [0u8; size_of::<T>()] is actually much more
0 commit comments