rust: uaccess: take advantage of the prelude and `Result`'s defaults
authorMiguel Ojeda <ojeda@kernel.org>
Tue, 29 Apr 2025 15:14:45 +0000 (17:14 +0200)
committerMiguel Ojeda <ojeda@kernel.org>
Sun, 11 May 2025 22:20:25 +0000 (00:20 +0200)
commit7d8dee4689278e174900509b8c4604651159d8ee
treedd5cbe5311d6645725c812b15bee9eee3f1c55dd
parent0fa5f8c877cae959de7cf6c3dc054e23e7ebcd75
rust: uaccess: take advantage of the prelude and `Result`'s defaults

The `kernel` prelude brings `Result` and the error codes; and the prelude
itself is already available in the examples automatically.

In addition, `Result` already defaults to `T = ()`.

Thus simplify.

Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Link: https://lore.kernel.org/r/20250429151445.438977-1-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
rust/kernel/uaccess.rs