diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-08-09 09:34:34 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-08-09 09:34:34 +0900 |
| commit | dfd98ce4b227a3a14dc913c669bee4f077a65178 (patch) | |
| tree | def0558566319a18ffbcdc4eb4e5175e3c6c9bb0 /crates/shirabe/tests/autoload | |
| parent | d2a28f8c07b0aa713be338005c6153011d70f24b (diff) | |
| download | php-shirabe-dfd98ce4b227a3a14dc913c669bee4f077a65178.tar.gz php-shirabe-dfd98ce4b227a3a14dc913c669bee4f077a65178.tar.zst php-shirabe-dfd98ce4b227a3a14dc913c669bee4f077a65178.zip | |
refactor(php-shim): make the fs mutators return Result
mkdir, rmdir, unlink and symlink each had a bool version and a _result
twin returning the io::Error, which left two names for one call. Keep
only the Result form and let the callers that want a boolean spell out
.is_ok(). Call sites that discard the outcome, as their PHP originals
do, are unchanged.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/tests/autoload')
| -rw-r--r-- | crates/shirabe/tests/autoload/autoload_generator_test.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/shirabe/tests/autoload/autoload_generator_test.rs b/crates/shirabe/tests/autoload/autoload_generator_test.rs index 97fabf16..81a4040f 100644 --- a/crates/shirabe/tests/autoload/autoload_generator_test.rs +++ b/crates/shirabe/tests/autoload/autoload_generator_test.rs @@ -2535,7 +2535,7 @@ fn test_absolute_symlink_with_psr4_does_not_generate_warnings() { // Create an absolute symlink let target = format!("{}/tools-real", s.working_dir); let r#link = format!("{}/tools", s.working_dir); - assert!(shirabe_php_shim::symlink(&target, &r#link)); + assert!(shirabe_php_shim::symlink(&target, &r#link).is_ok()); package.set_autoload(autoload(vec![ ("psr-4", str_map(&[("MyTools\\", pstr("tools/"))])), @@ -2577,7 +2577,7 @@ fn test_absolute_symlink_with_classmap_exclude_from_classmap() { // Create an absolute symlink let target = format!("{}/tools-real", s.working_dir); let r#link = format!("{}/tools", s.working_dir); - assert!(shirabe_php_shim::symlink(&target, &r#link)); + assert!(shirabe_php_shim::symlink(&target, &r#link).is_ok()); package.set_autoload(autoload(vec![ ("classmap", str_list(&["tools/"])), |
