Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silence some compiler warnings about unused imports #900

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions tests/arrays.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![cfg(not(feature = "no_index"))]
use rhai::{Array, Dynamic, Engine, EvalAltResult, ParseErrorType, Position, INT};
use std::{convert::TryInto, iter::FromIterator};
use rhai::{Array, Dynamic, Engine, ParseErrorType, INT};
use std::iter::FromIterator;

#[test]
fn test_arrays() {
Expand Down Expand Up @@ -504,6 +504,9 @@ fn test_arrays_elvis() {
#[test]
#[cfg(feature = "internals")]
fn test_array_invalid_index_callback() {
use rhai::{EvalAltResult, Position};
use std::convert::TryInto;

let mut engine = Engine::new();

engine.on_invalid_array_index(|arr, index, _| match index {
Expand Down
2 changes: 1 addition & 1 deletion tests/custom_syntax.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![cfg(not(feature = "no_custom_syntax"))]

use rhai::{Dynamic, Engine, EvalAltResult, FnPtr, ImmutableString, LexError, ParseErrorType, Position, Scope, INT};
use rhai::{Dynamic, Engine, EvalAltResult, ImmutableString, LexError, ParseErrorType, Position, Scope, INT};

#[test]
fn test_custom_syntax() {
Expand Down
6 changes: 4 additions & 2 deletions tests/maps.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#![cfg(not(feature = "no_object"))]
use rhai::{Dynamic, Engine, EvalAltResult, Map, ParseErrorType, Position, Scope, INT};
use std::convert::TryInto;
use rhai::{Engine, EvalAltResult, Map, ParseErrorType, Scope, INT};

#[test]
fn test_map_indexing() {
Expand Down Expand Up @@ -260,6 +259,9 @@ fn test_map_oop() {
#[test]
#[cfg(feature = "internals")]
fn test_map_missing_property_callback() {
use rhai::{Dynamic, Position};
use std::convert::TryInto;

let mut engine = Engine::new();

engine.on_map_missing_property(|map, prop, _| match prop {
Expand Down
4 changes: 3 additions & 1 deletion tests/optimizer.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![cfg(not(feature = "no_optimize"))]
use rhai::{Engine, FuncRegistration, Module, OptimizationLevel, Scope, INT};
use rhai::{Engine, FuncRegistration, OptimizationLevel, Scope, INT};

#[test]
fn test_optimizer() {
Expand Down Expand Up @@ -61,6 +61,8 @@ fn test_optimizer_run() {
#[cfg(not(feature = "no_position"))]
#[test]
fn test_optimizer_parse() {
use rhai::Module;

let mut engine = Engine::new();

engine.set_optimization_level(OptimizationLevel::Simple);
Expand Down
Loading