Skip to content

Commit 8ce462f

Browse files
committed
feat: [OHOS port]: rerun cargo fmt
1 parent 86149fb commit 8ce462f

4 files changed

Lines changed: 9 additions & 7 deletions

File tree

phira/src/images.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ impl Images {
3838
#[cfg(target_env = "ohos")]
3939
{
4040
let rgb_image = DynamicImage::ImageRgb8(image.to_rgb8());
41-
rgb_image.save_with_format(path, image::ImageFormat::Jpeg).context("Failed to save image")?;
41+
rgb_image
42+
.save_with_format(path, image::ImageFormat::Jpeg)
43+
.context("Failed to save image")?;
4244
}
4345
image
4446
})

phira/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -449,28 +449,28 @@ pub unsafe extern "C" fn Java_quad_1native_QuadNative_antiAddictionCallback(
449449

450450
#[cfg(target_env = "ohos")]
451451
#[napi]
452-
pub fn set_input_text(text: String){
452+
pub fn set_input_text(text: String) {
453453
use prpr::scene::INPUT_TEXT;
454454
INPUT_TEXT.lock().unwrap().1 = Some(text);
455455
}
456456

457457
#[cfg(target_env = "ohos")]
458458
#[napi]
459-
pub fn set_chosen_file(file: String){
459+
pub fn set_chosen_file(file: String) {
460460
use prpr::scene::CHOSEN_FILE;
461461
CHOSEN_FILE.lock().unwrap().1 = Some(file);
462462
}
463463

464464
#[cfg(target_env = "ohos")]
465465
#[napi]
466-
pub fn mark_import(){
466+
pub fn mark_import() {
467467
use prpr::scene::CHOSEN_FILE;
468468
CHOSEN_FILE.lock().unwrap().0 = Some("_import".to_owned());
469469
}
470470

471471
#[cfg(target_env = "ohos")]
472472
#[napi]
473-
pub fn mark_import_respack(){
473+
pub fn mark_import_respack() {
474474
use prpr::scene::CHOSEN_FILE;
475475
CHOSEN_FILE.lock().unwrap().0 = Some("_import_respack".to_owned());
476476
}

prpr/src/ext.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ pub fn create_audio_manger(config: &Config) -> Result<AudioManager> {
409409
channels: 2,
410410
}))
411411
}
412-
#[cfg(not(any(target_os = "android",target_env = "ohos")))]
412+
#[cfg(not(any(target_os = "android", target_env = "ohos")))]
413413
{
414414
use sasa::backend::cpal::*;
415415
AudioManager::new(CpalBackend::new(CpalSettings {

prpr/src/ui.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,7 @@ fn build_audio() -> AudioManager {
12021202
channels: 2,
12031203
}))
12041204
}
1205-
#[cfg(not(any(target_os = "android",target_env = "ohos")))]
1205+
#[cfg(not(any(target_os = "android", target_env = "ohos")))]
12061206
{
12071207
use sasa::backend::cpal::*;
12081208
AudioManager::new(CpalBackend::new(CpalSettings::default()))

0 commit comments

Comments
 (0)