aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/factory.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/factory.rs')
-rw-r--r--crates/shirabe/src/factory.rs11
1 files changed, 2 insertions, 9 deletions
diff --git a/crates/shirabe/src/factory.rs b/crates/shirabe/src/factory.rs
index de632143..7328bf42 100644
--- a/crates/shirabe/src/factory.rs
+++ b/crates/shirabe/src/factory.rs
@@ -375,15 +375,8 @@ impl Factory {
}
pub fn get_lock_file(composer_file: &str) -> String {
- let ext = pathinfo(
- PhpMixed::String(composer_file.to_string()),
- PATHINFO_EXTENSION,
- );
- let is_json = match ext {
- PhpMixed::String(s) => s == "json",
- _ => false,
- };
- if is_json {
+ let ext = pathinfo(composer_file, PATHINFO_EXTENSION);
+ if ext == "json" {
format!(
"{}lock",
substr(composer_file, 0, Some(composer_file.len() as i64 - 4))