Skip to content

Commit 14d8646

Browse files
author
Sven Van Asbroeck
committed
rust-core/of: remove unnecessary explicit type annotation
If Rust is able to automatically infer a type, then an explicit type annotation is unnecessary, and can be removed. Signed-off-by: Sven Van Asbroeck <thesven73@gmail.com>
1 parent 698f04d commit 14d8646

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rust/kernel/of.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub struct OfMatchTable(InnerTable);
3333
impl OfMatchTable {
3434
/// Creates a [`OfMatchTable`] from a single `compatible` string.
3535
pub fn new(compatible: &CStr<'static>) -> Result<Self> {
36-
let tbl: InnerTable = Box::try_new([
36+
let tbl = Box::try_new([
3737
Self::new_of_device_id(compatible)?,
3838
bindings::of_device_id::default(),
3939
])?;

0 commit comments

Comments
 (0)