Skip to content

Commit 8cf02e9

Browse files
Auto-format: cargo fmt --all
1 parent 3343b1c commit 8cf02e9

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

crates/vm/src/builtins/genericalias.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -735,9 +735,10 @@ pub fn subscript_generic(type_params: PyObjectRef, vm: &VirtualMachine) -> PyRes
735735
};
736736

737737
// Unpack TypeVarTuples: wrap each TypeVarTuple in Unpack[...]
738-
let has_tvt = params
739-
.iter()
740-
.any(|p| p.downcast_ref::<crate::stdlib::typing::TypeVarTuple>().is_some());
738+
let has_tvt = params.iter().any(|p| {
739+
p.downcast_ref::<crate::stdlib::typing::TypeVarTuple>()
740+
.is_some()
741+
});
741742

742743
let args = if has_tvt {
743744
let unpack_cls = typing_module.get_attr("Unpack", vm)?;

crates/vm/src/stdlib/typevar.rs

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@ pub(crate) mod typevar {
2323
call_typing_func_object(vm, "_type_check", (arg, message_str))
2424
}
2525

26-
fn variance_repr(name: &str, infer_variance: bool, covariant: bool, contravariant: bool) -> String {
26+
fn variance_repr(
27+
name: &str,
28+
infer_variance: bool,
29+
covariant: bool,
30+
contravariant: bool,
31+
) -> String {
2732
if infer_variance {
2833
return name.to_string();
2934
}
@@ -284,7 +289,12 @@ pub(crate) mod typevar {
284289
#[inline(always)]
285290
fn repr_str(zelf: &crate::Py<Self>, vm: &VirtualMachine) -> PyResult<String> {
286291
let name = zelf.name.str(vm)?;
287-
Ok(variance_repr(name.as_str(), zelf.infer_variance, zelf.covariant, zelf.contravariant))
292+
Ok(variance_repr(
293+
name.as_str(),
294+
zelf.infer_variance,
295+
zelf.covariant,
296+
zelf.contravariant,
297+
))
288298
}
289299
}
290300

@@ -675,7 +685,12 @@ pub(crate) mod typevar {
675685
#[inline(always)]
676686
fn repr_str(zelf: &crate::Py<Self>, vm: &VirtualMachine) -> PyResult<String> {
677687
let name = zelf.__name__().str(vm)?;
678-
Ok(variance_repr(name.as_str(), zelf.infer_variance, zelf.covariant, zelf.contravariant))
688+
Ok(variance_repr(
689+
name.as_str(),
690+
zelf.infer_variance,
691+
zelf.covariant,
692+
zelf.contravariant,
693+
))
679694
}
680695
}
681696

0 commit comments

Comments
 (0)