You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: button.rs
    path of file: ./repos/conwayste/conwayste/src/ui
    
    the code of the file until where you have to start completion: /*  Copyright 2019-2020 the Conwayste Developers.
 *
 *  This file is part of con
    
    fn center_label_text(&mut self) {
        let text_dims = self.label.rect();
        let tmp_label_rect = Rect::new(self.dimensions.x, self.dimensions.y, text_dims.w, text_dims.h);
        let label_center_point = center(&tmp_label_rect);
        let button_center = center(&self.dimensions);

        self.label.set_position(
            self.dimensions.x + (button_center.x - label_center_point.x),
            self.dimensions.y + (button_center.y - label_center_point.y),
        );
    }