diff options
author | Agathe Porte <microjoe@microjoe.org> | 2020-02-27 12:53:42 +0100 |
---|---|---|
committer | Agathe Porte <microjoe@microjoe.org> | 2020-02-27 12:53:42 +0100 |
commit | 5ea929298cff29b68aee860cfcedd9f320057d74 (patch) | |
tree | 964fdd70a2e32c15620a24bb6d893cf51ea5c80d | |
parent | f565f3fcacdf94a58ab97b41b12849f491e2dce2 (diff) | |
download | charlcd-5ea929298cff29b68aee860cfcedd9f320057d74.tar.gz charlcd-5ea929298cff29b68aee860cfcedd9f320057d74.zip |
of_node: extract variable to make the code clearer
-rw-r--r-- | src/of_node.rs | 3 |
1 files changed, 2 insertions, 1 deletions
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<u32> { "/sys/devices/platform/auxdisplay/of_node/{}", node_name ))?; - Ok(f.read_u32::<BigEndian>()?) + let value = f.read_u32::<BigEndian>()?; + Ok(value) } pub fn display_height_chars() -> Result<u32> { |