diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-22 01:43:34 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-22 01:44:05 +0900 |
| commit | 6739da8a8e271a82d1bf8ca79bba58640ae6e743 (patch) | |
| tree | ce397b02662cf3c101cb36545b0a6c94ddc21826 /crates/shirabe/src/util/filesystem.rs | |
| parent | 0b06f54103490e3ce5658e82bbc0119633e26cd8 (diff) | |
| download | php-shirabe-6739da8a8e271a82d1bf8ca79bba58640ae6e743.tar.gz php-shirabe-6739da8a8e271a82d1bf8ca79bba58640ae6e743.tar.zst php-shirabe-6739da8a8e271a82d1bf8ca79bba58640ae6e743.zip | |
refactor(php-shim): remove unnecessary methods
Diffstat (limited to 'crates/shirabe/src/util/filesystem.rs')
| -rw-r--r-- | crates/shirabe/src/util/filesystem.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/shirabe/src/util/filesystem.rs b/crates/shirabe/src/util/filesystem.rs index a51b0f3..96316e9 100644 --- a/crates/shirabe/src/util/filesystem.rs +++ b/crates/shirabe/src/util/filesystem.rs @@ -419,7 +419,7 @@ impl Filesystem { if str_contains(&e.message, "Bad address") { let source_handle = fopen(source, "r"); let target_handle = fopen(&target, "w"); - if source_handle.is_none() || target_handle.is_none() { + if source_handle.is_null() || target_handle.is_null() { return Err(e.into()); } while !feof(source_handle.clone()) { @@ -1035,14 +1035,14 @@ impl Filesystem { pub fn safe_copy(&self, source: &str, target: &str) -> anyhow::Result<()> { if !file_exists(target) || !file_exists(source) || !self.files_are_equal(source, target) { let source_handle = fopen(source, "r"); - if source_handle.is_none() { + if source_handle.is_null() { return Err(anyhow::anyhow!( "Could not open \"{}\" for reading.", source )); } let target_handle = fopen(target, "w+"); - if target_handle.is_none() { + if target_handle.is_null() { return Err(anyhow::anyhow!( "Could not open \"{}\" for writing.", target @@ -1070,11 +1070,11 @@ impl Filesystem { // Check if content is different let a_handle = fopen(a, "rb"); - if a_handle.is_none() { + if a_handle.is_null() { return false; } let b_handle = fopen(b, "rb"); - if b_handle.is_none() { + if b_handle.is_null() { return false; } |
