rust: kernel: list: fix incorrect pop_back example comment
PATCH 1/1 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.
--- rust/kernel/list.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
rust/kernel/list.rs +1 -1
@@ -249,7 +249,7 @@/// 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));
Signature · 1 line
2.55.0
Quoted 5 lines · Nikolai Grlica
The example uses
pop_back(), but the accompanying comment sayspop_front(). Update the comment to match the example.Signed-off-by Nikolai Grlica <[email protected]>
Good eyes, thanks -- and welcome! I think it is your first patch to the kernel (?).
Some extra tags I will add when applying it:
By the way, for future patches, please remember to Cc the relevant reviewers and maintainers -- you can use e.g. scripts/get_maintainer.pl for that. Done here for you! :) I have some other tips and links here:
https://rust-for-linux.com/contributing
I hope that helps!
Cheers,
Miguel
Miguel Ojeda
AppliedQuoted 5 lines · Nikolai Grlica
The example uses
pop_back(), but the accompanying comment sayspop_front(). Update the comment to match the example.Signed-off-by Nikolai Grlica <[email protected]>
Applied to rust-fixes -- thanks!
ListLinksSelfPtr usage")
Cheers,
Miguel