Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fixed the redundant_closure clippy warning
  • Loading branch information
ZapAnton committed Feb 12, 2019
commit e8467c3bfe89d6d8a6fb4a434b6285db7167f57b
2 changes: 1 addition & 1 deletion wasm/lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ fn eval(vm: &mut VirtualMachine, source: &str, vars: PyObjectRef) -> PyResult {
/// - `stdout?`: `(out: string) => void`: A function to replace the native print
/// function, by default `console.log`.
pub fn eval_py(source: &str, options: Option<Object>) -> Result<JsValue, JsValue> {
let options = options.unwrap_or_else(|| Object::new());
let options = options.unwrap_or_else(Object::new);
let js_vars = {
let prop = Reflect::get(&options, &"vars".into())?;
if prop.is_undefined() {
Expand Down