Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
schungx committed Mar 4, 2024
1 parent bb622d0 commit 5975d97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/packages/lang_core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ mod core_functions {
let out = serde_json::from_str(json).map_err(|err| err.to_string().into());

#[cfg(not(feature = "metadata"))]
let out = ctx
let out = _ctx
.engine()
.parse_json(json, true)
.map(|map_object| Dynamic::from(map_object));
Expand Down
4 changes: 2 additions & 2 deletions tests/parse_json.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use rhai::{Engine, ParseErrorType, Scope, INT};
use rhai::{Engine, LexError, ParseErrorType, Scope, INT};

Check warning on line 1 in tests/parse_json.rs

View workflow job for this annotation

GitHub Actions / Build (stable, macos-latest, false)

unused imports: `INT`, `LexError`, `ParseErrorType`

Check warning on line 1 in tests/parse_json.rs

View workflow job for this annotation

GitHub Actions / Build (beta, ubuntu-latest, false, --features unstable)

unused imports: `INT`, `LexError`, `ParseErrorType`

Check warning on line 1 in tests/parse_json.rs

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest, --features testing-environ,no_optimize,serde,metadata,internals,debugging, ...

unused imports: `INT`, `LexError`, `ParseErrorType`

Check warning on line 1 in tests/parse_json.rs

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest, --features testing-environ,no_custom_syntax,serde,metadata,internals,debugg...

unused imports: `INT`, `LexError`, `ParseErrorType`

Check warning on line 1 in tests/parse_json.rs

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest, --features testing-environ,sync,serde,metadata,internals,debugging, stable,...

unused imports: `INT`, `LexError`, `ParseErrorType`

Check warning on line 1 in tests/parse_json.rs

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest, --features testing-environ,f32_float,serde,metadata,internals,debugging, st...

unused imports: `INT`, `LexError`, `ParseErrorType`

Check warning on line 1 in tests/parse_json.rs

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest, --features testing-environ,no_module,serde,metadata,internals,debugging, st...

unused imports: `INT`, `LexError`, `ParseErrorType`

Check warning on line 1 in tests/parse_json.rs

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest, --features testing-environ,no_closure,serde,metadata,internals,debugging, s...

unused imports: `INT`, `LexError`, `ParseErrorType`

Check warning on line 1 in tests/parse_json.rs

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest, --features testing-environ,metadata, stable, false)

unused imports: `INT`, `LexError`, `ParseErrorType`

Check warning on line 1 in tests/parse_json.rs

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest, --tests --features testing-environ,only_i32,serde,metadata,internals,debugg...

unused imports: `INT`, `LexError`, `ParseErrorType`

Check warning on line 1 in tests/parse_json.rs

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest, --features testing-environ,unicode-xid-ident, stable, false)

unused imports: `INT`, `LexError`, `ParseErrorType`

Check warning on line 1 in tests/parse_json.rs

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest, --features testing-environ,no_float,decimal, stable, false)

unused imports: `INT`, `LexError`, `ParseErrorType`

Check warning on line 1 in tests/parse_json.rs

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest, --features testing-environ,debugging, stable, false)

unused imports: `INT`, `LexError`, `ParseErrorType`

Check warning on line 1 in tests/parse_json.rs

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest, --features testing-environ,unchecked,serde,metadata,internals,debugging, st...

unused imports: `INT`, `LexError`, `ParseErrorType`

#[cfg(not(feature = "metadata"))]
mod without_metadata {
Expand Down Expand Up @@ -184,6 +184,6 @@ mod with_metadata {
.unwrap_err();

assert!(matches!(err.as_ref(), rhai::EvalAltResult::ErrorFunctionNotFound(msg, pos)
if msg == "parse_json (&str | ImmutableString | String)" && *pos == rhai::Position::new(2, 13)));
if msg == "parse_json (&str | ImmutableString | String)" && *pos == rhai::Position::new(2, 17)));
}
}

0 comments on commit 5975d97

Please sign in to comment.