fn digit_clicked(&self, value: usize) {
        let mut state = self.state.borrow_mut();
        let mut display_text = self.display.text();

        if display_text == "0" && value == 0 {
            return;
        }

        if state.waiting_for_operand {
            display_text.clear();
            state.waiting_for_operand = false;
        }

        println!("set text {}", display_text);

        self.display.set_text(&format!("{}{}", display_text, value));
    }
/// Called every time a digit is being pressed
Called every time a digit is being pressed
Called every time a digit is being pressed
fn digit_clicked(&self, value: usize) {
        let mut state = self.state.borrow_mut();
        let mut display_text = self.display.text();
        if display_text == "0" && value == 0 {
            return;
        }
        if state.waiting_for_operand {
            display_text.clear();
            state.waiting_for_operand = false;
        }
        println!("set text {}", display_text);
        self.display.set_text(&format!("{}{}", display_text, value));
    }
fn digit_clicked ( & self , value : usize ) { let mut state = self . state . borrow_mut ( ) ; let mut display_text = self . display . text ( ) ; if display_text == " " && value == 0 { return ; } if state . waiting_for_operand { display_text . clear ( ) ; state . waiting_for_operand = false ; } println ! ( " " display_text ) ; self . display . set_text ( & format ! ( " " display_text value ) ) ; }
Called every time a digit is being pressed
Called every time a digit is being pressed
&self
value
usize
&self
value
usize