From 5ea929298cff29b68aee860cfcedd9f320057d74 Mon Sep 17 00:00:00 2001 From: Agathe Porte Date: Thu, 27 Feb 2020 12:53:42 +0100 Subject: of_node: extract variable to make the code clearer --- src/of_node.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/of_node.rs b/src/of_node.rs index 5dff2a0..01806df 100644 --- a/src/of_node.rs +++ b/src/of_node.rs @@ -12,7 +12,8 @@ fn read_u32_node(node_name: &str) -> Result { "/sys/devices/platform/auxdisplay/of_node/{}", node_name ))?; - Ok(f.read_u32::()?) + let value = f.read_u32::()?; + Ok(value) } pub fn display_height_chars() -> Result { -- cgit v1.2.3