Skip to content

Commit 0d0dd61

Browse files
MiseiMisei
authored andcommitted
fix: apply rust fmt formatting to build.rs and lib.rs
1 parent 23c0d29 commit 0d0dd61

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

src-tauri/build.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
fn main() {
2-
// Git commit hash を環境変数として埋め込む
3-
let output = std::process::Command::new("git")
4-
.args(["rev-parse", "--short", "HEAD"])
5-
.output();
6-
7-
if let Ok(output) = output {
8-
if output.status.success() {
9-
let git_hash = String::from_utf8_lossy(&output.stdout);
10-
println!("cargo:rustc-env=GIT_HASH={}", git_hash.trim());
11-
}
12-
}
13-
14-
tauri_build::build()
15-
}
1+
fn main() {
2+
// Git commit hash を環境変数として埋め込む
3+
let output = std::process::Command::new("git")
4+
.args(["rev-parse", "--short", "HEAD"])
5+
.output();
6+
7+
if let Ok(output) = output {
8+
if output.status.success() {
9+
let git_hash = String::from_utf8_lossy(&output.stdout);
10+
println!("cargo:rustc-env=GIT_HASH={}", git_hash.trim());
11+
}
12+
}
13+
14+
tauri_build::build()
15+
}

src-tauri/src/lib.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ fn get_git_commit() -> String {
2525
#[cfg(desktop)]
2626
async fn check_and_install_update(app: tauri::AppHandle) -> Result<(), Box<dyn std::error::Error>> {
2727
tracing::info!("Checking for updates...");
28-
28+
2929
match app.updater()?.check().await {
3030
Ok(Some(update)) => {
3131
tracing::info!(
3232
"Update available: {} (current: {})",
3333
update.version,
3434
update.current_version
3535
);
36-
36+
3737
let mut downloaded = 0u64;
38-
38+
3939
update
4040
.download_and_install(
4141
|chunk_length, content_length| {
@@ -51,7 +51,7 @@ async fn check_and_install_update(app: tauri::AppHandle) -> Result<(), Box<dyn s
5151
},
5252
)
5353
.await?;
54-
54+
5555
tracing::info!("Update installed successfully. The app will restart.");
5656
app.restart();
5757
}
@@ -63,7 +63,7 @@ async fn check_and_install_update(app: tauri::AppHandle) -> Result<(), Box<dyn s
6363
return Err(e.into());
6464
}
6565
}
66-
66+
6767
Ok(())
6868
}
6969

@@ -106,7 +106,7 @@ pub fn run() {
106106
app.handle()
107107
.plugin(tauri_plugin_process::init())
108108
.expect("Failed to initialize process plugin");
109-
109+
110110
// Check for updates in background
111111
let handle = app.handle().clone();
112112
tauri::async_runtime::spawn(async move {
@@ -115,7 +115,7 @@ pub fn run() {
115115
}
116116
});
117117
}
118-
118+
119119
let handle = app.handle().clone();
120120
let state: tauri::State<AppState> = app.state();
121121
let state_inner = state.inner().clone();

0 commit comments

Comments
 (0)