From 50b8fe365a3e0d7a606dac3e1706ec1aa56a7e93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hozda?= Date: Mon, 30 Oct 2017 08:53:11 +0100 Subject: [PATCH] fix warning in lib.rs doctest --- src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index c3466507..d97fea0f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -27,9 +27,8 @@ //! # // Very ugly hack incoming, TODO //! # use std::fs::{File, remove_file}; //! # use std::io::Write; -//! # use std::mem::drop; //! # let mut f = File::create("my_script.rhai").unwrap(); -//! # write!(f, "{}", "fn f(x) { if x == 1 { return 1; } x * f(x-1) } compute_something(f(10))"); +//! # let _ = write!(f, "{}", "fn f(x) { if x == 1 { return 1; } x * f(x-1) } compute_something(f(10))"); //! assert!(engine.eval_file::("my_script.rhai").unwrap()); //! # let _ = remove_file("my_script.rhai"); //! ```