Skip to main content

translate_while_test

Function translate_while_test 

Source
pub fn translate_while_test(test: &Expr) -> String
Expand description

Translate a Python while-loop test expression to Rust.

Handles:

  • while changed:while changed
  • while not changed:while !changed
  • while i < len(x):while i < x.len()