From 66a66b03b4f82f0c1e7752c842d3c6ffaf5eb528 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 14 Jun 2019 15:29:16 +0800 Subject: [PATCH] style --- artiq/firmware/runtime/rtio_clocking.rs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/artiq/firmware/runtime/rtio_clocking.rs b/artiq/firmware/runtime/rtio_clocking.rs index 5d9382dfc..f4c926890 100644 --- a/artiq/firmware/runtime/rtio_clocking.rs +++ b/artiq/firmware/runtime/rtio_clocking.rs @@ -147,16 +147,11 @@ pub fn init() { #[cfg(has_rtio_crg)] { #[cfg(has_rtio_clock_switch)] - { - if !crg::init(get_rtio_clock_cfg()) { - error!("RTIO clock failed"); - } - } + let result = !crg::init(get_rtio_clock_cfg()); #[cfg(not(has_rtio_clock_switch))] - { - if !crg::init() { - error!("RTIO clock failed"); - } + let result = !crg::init(); + if !result { + error!("RTIO clock failed"); } } }