From d9654ab292dfdbe9a4afaf9a3fc9719ae45f8b19 Mon Sep 17 00:00:00 2001 From: Michael Sippel Date: Sat, 22 May 2021 01:39:08 +0200 Subject: [PATCH] radix transform: fix misnamed variable the _ caused the variable to be optimized away, which is not desired --- math/radix_transform/src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/math/radix_transform/src/main.rs b/math/radix_transform/src/main.rs index fe904bd..97aef98 100644 --- a/math/radix_transform/src/main.rs +++ b/math/radix_transform/src/main.rs @@ -80,7 +80,7 @@ async fn main() { let mut args = std::env::args(); args.next().expect("Arg $0 missing!"); - + let src_radix_str = args.next().expect("Arg $1 required!"); let dst_radix_str = args.next().expect("Arg $2 required!"); @@ -103,7 +103,7 @@ async fn main() { ); // output dst digits - let _writer = { + let writer = { use std::{ os::unix::io::FromRawFd }; @@ -119,5 +119,7 @@ async fn main() { src_digits.from_json(unsafe { async_std::fs::File::from_raw_fd(0) }).await; } + + drop(writer); }