mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-09-18 22:59:29 +02:00
rust: kernel: list: fix incorrect pop_back example comment
The example uses pop_back(), but the accompanying comment says
pop_front(). Update the comment to match the example.
Signed-off-by: Nikolai Grlica <nikolai@nikolaigrlica.dev>
Cc: stable@vger.kernel.org
Fixes: bf87a41b85 ("rust: list: Add an example for `ListLinksSelfPtr` usage")
Link: https://patch.msgid.link/20260810150322.61809-1-nikolai@nikolaigrlica.dev
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
This commit is contained in:
committed by
Miguel Ojeda
parent
d24f5cdbef
commit
a5c7d35e2f
+1
-1
@@ -249,7 +249,7 @@ pub use self::arc_field::{
|
||||
/// assert_eq!(list.iter().count(), 3);
|
||||
/// }
|
||||
///
|
||||
/// // Pop the items from the list using `pop_front()` and verify the content.
|
||||
/// // Pop the items from the list using `pop_back()` and verify the content.
|
||||
/// {
|
||||
/// assert_eq!(list.pop_back().ok_or(EINVAL)?.value.foo(), ("a", 15));
|
||||
/// assert_eq!(list.pop_back().ok_or(EINVAL)?.value.foo(), ("a", 32));
|
||||
|
||||
Reference in New Issue
Block a user