{"id":13828788,"url":"https://github.com/harryfei/sugar-rs","last_synced_at":"2025-12-12T14:36:48.213Z","repository":{"id":57668955,"uuid":"116689366","full_name":"harryfei/sugar-rs","owner":"harryfei","description":"Rust syntax sugar collections.","archived":false,"fork":false,"pushed_at":"2019-05-07T09:08:19.000Z","size":17,"stargazers_count":130,"open_issues_count":1,"forks_count":6,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-10-31T11:57:53.604Z","etag":null,"topics":["macro","rust","sugar","syntax"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/harryfei.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-08T14:49:35.000Z","updated_at":"2024-03-29T17:27:45.000Z","dependencies_parsed_at":"2022-08-27T03:51:21.087Z","dependency_job_id":null,"html_url":"https://github.com/harryfei/sugar-rs","commit_stats":null,"previous_names":["fangyuanziti/sugar-rs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harryfei%2Fsugar-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harryfei%2Fsugar-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harryfei%2Fsugar-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harryfei%2Fsugar-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harryfei","download_url":"https://codeload.github.com/harryfei/sugar-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225402698,"owners_count":17468837,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["macro","rust","sugar","syntax"],"created_at":"2024-08-04T09:03:09.453Z","updated_at":"2025-12-12T14:36:48.162Z","avatar_url":"https://github.com/harryfei.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# Sugar\n\nSyntax sugar to make your Rust life more sweet.\n\n## Usage\n```rust\nuse sugar::*;\n```\n## Overview\n\n```rust\nuse sugar::*;\n\n// vec of boxed value\nlet vb1 = vec_box![1, 2, 3];\n\n// vec/list comprehension\nlet vb2 = v![Box::new(i), for i in 1..4];\n\n// hashmap construction\nlet hm1 = hashmap!{\n    1 =\u003e 2,\n    2 =\u003e 3,\n    3 =\u003e 4,\n};\n\n// hashmap comprehension\nlet hm2 = m!{i =\u003e i + 1, for i in 1..4};\n\nlet _ = max!(1, 2, 3);\nlet _ = min!(1, 2, 3);\n\nif cmp!(1, \u003c num， \u003c 3) {\n    println!(\"num is between 1 and 3\");\n}\n\n```\n\nMore detail in sugar's [documentation](https://docs.rs/sugar).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharryfei%2Fsugar-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharryfei%2Fsugar-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharryfei%2Fsugar-rs/lists"}