Skip to content

Commit d009e29

Browse files
committed
clippy
1 parent a74ff6b commit d009e29

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

crates/berry-core/src/parse.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,9 @@ fn parse_single_descriptor(input: &str) -> IResult<&str, (&str, &str, &str)> {
173173
parse_patch_range,
174174
)
175175
.parse(input)
176+
&& protocol == "patch"
176177
{
177-
if protocol == "patch" {
178-
return Ok((remaining, (name_part, protocol, patch_range)));
179-
}
178+
return Ok((remaining, (name_part, protocol, patch_range)));
180179
}
181180

182181
// Try protocol:range format (e.g., npm:1.0.0)

0 commit comments

Comments
 (0)