(&self, udid: &str)
| 760 | } |
| 761 | |
| 762 | pub fn rotate_right(&self, udid: &str) -> Result<(), AppError> { |
| 763 | if self.simulator_has_fixed_orientation(udid).unwrap_or(false) { |
| 764 | return Err(fixed_orientation_error()); |
| 765 | } |
| 766 | let udid = CString::new(udid).map_err(|e| AppError::bad_request(e.to_string()))?; |
| 767 | unsafe { |
| 768 | let mut error = ptr::null_mut(); |
| 769 | bool_result( |
| 770 | ffi::xcw_native_rotate_right(udid.as_ptr(), &mut error), |
| 771 | error, |
| 772 | ) |
| 773 | } |
| 774 | } |
| 775 | |
| 776 | pub fn rotate_left(&self, udid: &str) -> Result<(), AppError> { |
| 777 | if self.simulator_has_fixed_orientation(udid).unwrap_or(false) { |
no test coverage detected