Skip to content

Commit b056044

Browse files
author
j30ng
committed
Fix CI Build in Rust 1.38.0
1 parent 9ccc9d7 commit b056044

File tree

4 files changed

+5
-13
lines changed

4 files changed

+5
-13
lines changed

vm/src/obj/objstr.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1326,9 +1326,7 @@ fn try_update_quantity_from_tuple(
13261326
Ok(tuple_index)
13271327
}
13281328
}
1329-
None => {
1330-
Err(vm.new_type_error("not enough arguments for format string".to_string()))
1331-
}
1329+
None => Err(vm.new_type_error("not enough arguments for format string".to_string())),
13321330
}
13331331
}
13341332
_ => Ok(tuple_index),

vm/src/stdlib/ast.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -620,12 +620,8 @@ fn comprehension_to_ast(
620620

621621
fn string_to_ast(vm: &VirtualMachine, string: &ast::StringGroup) -> PyResult<AstNodeRef> {
622622
let string = match string {
623-
ast::StringGroup::Constant { value } => {
624-
node!(vm, Str, { s => vm.ctx.new_str(value.clone()) })
625-
}
626-
ast::StringGroup::FormattedValue { value, .. } => {
627-
node!(vm, FormattedValue, { value => expression_to_ast(vm, value)? })
628-
}
623+
ast::StringGroup::Constant { value } => node!(vm, Str, { s => vm.ctx.new_str(value.clone()) }),
624+
ast::StringGroup::FormattedValue { value, .. } => node!(vm, FormattedValue, { value => expression_to_ast(vm, value)? }),
629625
ast::StringGroup::Joined { values } => {
630626
let py_values = map_ast(string_to_ast, vm, &values)?;
631627
node!(vm, JoinedStr, { values => py_values })

vm/src/stdlib/unicodedata.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ fn name(
5454
} else {
5555
match default {
5656
OptionalArg::Present(obj) => Ok(obj),
57-
OptionalArg::Missing => {
58-
Err(vm.new_value_error("character name not found!".to_string()))
59-
}
57+
OptionalArg::Missing => Err(vm.new_value_error("character name not found!".to_string())),
6058
}
6159
}
6260
}

wasm/lib/src/browser_module.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ fn browser_request_animation_frame(func: PyCallable, vm: &VirtualMachine) -> PyR
137137

138138
let closure = f.borrow_mut().take();
139139
drop(closure);
140-
}) as Box<Fn(f64)>));
140+
}) as Box<dyn Fn(f64)>));
141141

142142
let id = window()
143143
.request_animation_frame(&js_sys::Function::from(

0 commit comments

Comments
 (0)