summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAgathe Porte <microjoe@microjoe.org>2020-02-27 12:53:42 +0100
committerAgathe Porte <microjoe@microjoe.org>2020-02-27 12:53:42 +0100
commit5ea929298cff29b68aee860cfcedd9f320057d74 (patch)
tree964fdd70a2e32c15620a24bb6d893cf51ea5c80d /src
parentf565f3fcacdf94a58ab97b41b12849f491e2dce2 (diff)
downloadcharlcd-5ea929298cff29b68aee860cfcedd9f320057d74.tar.gz
charlcd-5ea929298cff29b68aee860cfcedd9f320057d74.zip
of_node: extract variable to make the code clearer
Diffstat (limited to 'src')
-rw-r--r--src/of_node.rs3
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> {