summaryrefslogtreecommitdiff
path: root/systems/sheet/macros
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-03-20 21:54:29 +0800
committer魏曹先生 <1992414357@qq.com>2026-03-20 21:57:49 +0800
commit9a60751a901f568bdeb154c4115235d4f3a0f8b9 (patch)
tree65df323f6478bae51473a3d6471df39a596ce9c5 /systems/sheet/macros
parenta9e5c086584d3e697188be7003f564e7e2137135 (diff)
Apply clippy suggestions and improve code quality
Diffstat (limited to 'systems/sheet/macros')
-rw-r--r--systems/sheet/macros/src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/systems/sheet/macros/src/lib.rs b/systems/sheet/macros/src/lib.rs
index 2990f7e..ea2b139 100644
--- a/systems/sheet/macros/src/lib.rs
+++ b/systems/sheet/macros/src/lib.rs
@@ -41,8 +41,8 @@ fn parse_id_version(input: &str) -> Result<(bool, u32, u16), String> {
let trimmed = input.trim();
// Check if it starts with ~ for local
- let (remote, id_part) = if trimmed.starts_with('~') {
- (false, &trimmed[1..])
+ let (remote, id_part) = if let Some(stripped) = trimmed.strip_prefix('~') {
+ (false, stripped)
} else {
(true, trimmed)
};