Skip to content

Commit 5acb66c

Browse files
committed
Fix further issues.
1 parent d4b9ad8 commit 5acb66c

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

vm/build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ fn main() {
55
#[cfg(feature = "freeze-stdlib")]
66
for entry in glob::glob("Lib/*/*.py").expect("Lib/ exists?").flatten() {
77
let display = entry.display();
8-
println!("cargo:rerun-if-changed={}", display);
8+
println!("cargo:rerun-if-changed={display}");
99
}
1010

1111
println!("cargo:rustc-env=RUSTPYTHON_GIT_HASH={}", git_hash());

vm/src/stdlib/os.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1673,7 +1673,7 @@ pub(super) mod _os {
16731673
Err(vm.new_value_error(format!("Invalid wait status: {status}")))
16741674
} else {
16751675
i32::try_from(status.rotate_right(8))
1676-
.map_err(|_| vm.new_value_error(format!("invalid wait status: {}", status)))
1676+
.map_err(|_| vm.new_value_error(format!("invalid wait status: {status}")))
16771677
}
16781678
}
16791679
}
@@ -1694,7 +1694,7 @@ pub(super) mod _os {
16941694
_ => 0,
16951695
};
16961696

1697-
Ok(Some(format!("cp{}", cp)))
1697+
Ok(Some(format!("cp{cp}")))
16981698
} else {
16991699
let encoding = unsafe {
17001700
let encoding = libc::nl_langinfo(libc::CODESET);

wasm/lib/src/convert.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ pub fn js_err_to_py_err(vm: &VirtualMachine, js_err: &JsValue) -> PyBaseExceptio
7272
}
7373
None => vm.new_exception_msg(
7474
vm.ctx.exceptions.exception_type.to_owned(),
75-
format!("{:?}", js_err),
75+
format!("{js_err:?}"),
7676
),
7777
}
7878
}
@@ -246,7 +246,7 @@ pub fn js_to_py(vm: &VirtualMachine, js_val: JsValue) -> PyObjectRef {
246246
}
247247

248248
pub fn syntax_err(err: CompileError) -> SyntaxError {
249-
let js_err = SyntaxError::new(&format!("Error parsing Python code: {}", err));
249+
let js_err = SyntaxError::new(&format!("Error parsing Python code: {err}"));
250250
let _ = Reflect::set(&js_err, &"row".into(), &(err.location.row() as u32).into());
251251
let _ = Reflect::set(
252252
&js_err,

wasm/lib/src/js_module.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ mod _js {
160160
.map(PyJsValue::new)
161161
.map_err(|err| new_js_error(vm, err))
162162
} else {
163-
Err(vm.new_attribute_error(format!("No attribute {:?} on JS value", name)))
163+
Err(vm.new_attribute_error(format!("No attribute {name:?} on JS value")))
164164
}
165165
}
166166

0 commit comments

Comments
 (0)