Skip to content

Commit 254abed

Browse files
killagu-clawclaude
andcommitted
style: apply rustfmt to lock.rs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 7ccacfc commit 254abed

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

crates/pm/src/helper/lock.rs

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -167,19 +167,18 @@ pub async fn update_package_json(
167167
for (name, version, version_spec) in package_specs {
168168
match action {
169169
PackageAction::Add => {
170-
let version_to_write = if version_spec.starts_with("git+")
171-
|| version_spec.starts_with("git://")
172-
{
173-
// Git specs: write the resolved URL (with pinned commit)
174-
version_spec.to_string()
175-
} else {
176-
match version_spec.as_str() {
177-
spec if spec.is_empty() || spec == "*" || spec == "latest" => {
178-
format!("^{version}")
170+
let version_to_write =
171+
if version_spec.starts_with("git+") || version_spec.starts_with("git://") {
172+
// Git specs: write the resolved URL (with pinned commit)
173+
version_spec.to_string()
174+
} else {
175+
match version_spec.as_str() {
176+
spec if spec.is_empty() || spec == "*" || spec == "latest" => {
177+
format!("^{version}")
178+
}
179+
spec => spec.to_string(),
179180
}
180-
spec => spec.to_string(),
181-
}
182-
};
181+
};
183182
deps_obj.insert(name, Value::String(version_to_write));
184183
}
185184
PackageAction::Remove => {

0 commit comments

Comments
 (0)