File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -338,6 +338,9 @@ def fn_num_pushed(self) -> str:
338338
339339 @property
340340 def fn_deopt (self ) -> str :
341+ def format_deopt_variants (lst : list [str ]) -> str :
342+ return "|" .join (f"Self::{ v } " for v in lst )
343+
341344 deopts = collections .defaultdict (list )
342345 for inst in self :
343346 deopt = inst .name
@@ -349,9 +352,9 @@ def fn_deopt(self) -> str:
349352 continue
350353 deopts [deopt ].append (inst .name )
351354
352- f = lambda l : "|" .join (f"Self::{ x } " for x in l )
353355 branches = ",\n " .join (
354- f"{ f (deopt )} => Self::{ name } " for name , deopt in sorted (deopts .items ())
356+ f"{ format_deopt_variants (deopt )} => Self::{ name } "
357+ for name , deopt in sorted (deopts .items ())
355358 )
356359 return f"""
357360pub const fn deopt(&self) -> Option<Self> {{
You can’t perform that action at this time.
0 commit comments