aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/util/remote_filesystem.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/util/remote_filesystem.rs')
-rw-r--r--crates/shirabe/src/util/remote_filesystem.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/crates/shirabe/src/util/remote_filesystem.rs b/crates/shirabe/src/util/remote_filesystem.rs
index 0bc004ce..e55e5200 100644
--- a/crates/shirabe/src/util/remote_filesystem.rs
+++ b/crates/shirabe/src/util/remote_filesystem.rs
@@ -13,7 +13,7 @@ use crate::util::Url;
use crate::util::http::ProxyManager;
use crate::util::http::Response;
use indexmap::IndexMap;
-use shirabe_pcre::{CaptureKey, Preg};
+use shirabe_pcre::Preg;
use shirabe_php_shim::Catch as _;
use shirabe_php_shim::{
PhpMixed, RuntimeException, STREAM_NOTIFY_FAILURE, STREAM_NOTIFY_FILE_SIZE_IS,
@@ -149,10 +149,7 @@ impl RemoteFilesystem {
let mut value: Option<i64> = None;
for header in headers {
if let Some(m) = Preg::is_match3(php_regex!("{^HTTP/\\S+ (\\d+)}i"), header) {
- value = m
- .get(&CaptureKey::ByIndex(1))
- .and_then(|s| s.parse().ok())
- .or(Some(0));
+ value = m.get(1).and_then(|s| s.parse().ok()).or(Some(0));
}
}