Skip to content

Commit 48b358e

Browse files
committed
fix windows tests and clippy
1 parent e262e8d commit 48b358e

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

crates/fig_proto/build.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,19 +133,17 @@ fn download_protoc_windows(protoc_version: &str, tmp_folder: &tempfile::TempDir)
133133
// Verify checksum using PowerShell
134134
let mut checksum_command = Command::new("powershell");
135135
checksum_command.arg("-Command").arg(format!(
136-
"(Get-FileHash -Path '{}' -Algorithm SHA256).Hash.ToLower()",
136+
"(Get-FileHash -Path '{}' -Algorithm SHA256).Hash",
137137
tmp_folder.path().join("protoc.zip").display()
138138
));
139139
let checksum_output = checksum_command.output().unwrap();
140140
let checksum_output = String::from_utf8(checksum_output.stdout).unwrap().trim().to_lowercase();
141141

142142
eprintln!("checksum: {checksum_output:?}");
143143
assert_eq!(
144-
checksum_output,
145-
checksum.to_lowercase(),
144+
checksum_output, checksum,
146145
"Checksum verification failed. Expected: {}, Got: {}",
147-
checksum.to_lowercase(),
148-
checksum_output
146+
checksum, checksum_output
149147
);
150148

151149
// Extract using PowerShell
@@ -169,7 +167,9 @@ fn download_protoc_windows(protoc_version: &str, tmp_folder: &tempfile::TempDir)
169167
));
170168
assert!(copy_command.spawn().unwrap().wait().unwrap().success());
171169

172-
std::env::set_var("PROTOC", out_bin);
170+
unsafe {
171+
std::env::set_var("PROTOC", out_bin);
172+
}
173173
}
174174

175175
fn main() -> Result<()> {

crates/fig_settings/src/sqlite/mod.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ use rusqlite::{
1616
params,
1717
};
1818
use serde_json::Map;
19-
use tracing::{
20-
debug,
21-
info,
22-
};
19+
use tracing::info;
2320

2421
use crate::Result;
2522
use crate::error::DbOpenError;
@@ -100,7 +97,6 @@ impl Db {
10097
let metadata = std::fs::metadata(path)?;
10198
let mut permissions = metadata.permissions();
10299
if permissions.mode() & 0o777 != 0o600 {
103-
debug!(?path, "Setting database file permissions to 0600");
104100
permissions.set_mode(0o600);
105101
std::fs::set_permissions(path, permissions)?;
106102
}

0 commit comments

Comments
 (0)