{"id":29671277,"url":"https://github.com/anoma/smooth-operator","last_synced_at":"2025-07-22T20:07:22.516Z","repository":{"id":236346247,"uuid":"792420222","full_name":"anoma/smooth-operator","owner":"anoma","description":"Rust checked arithmetic without the visual clutter","archived":false,"fork":false,"pushed_at":"2024-12-16T11:20:21.000Z","size":40,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-07-02T02:17:53.839Z","etag":null,"topics":["checked-arithmetic","procedural-macro","rust","syntax"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anoma.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-26T16:24:01.000Z","updated_at":"2025-04-04T03:48:18.000Z","dependencies_parsed_at":"2024-06-04T00:05:46.754Z","dependency_job_id":"924b4a9d-bf72-492c-94d7-be3640804360","html_url":"https://github.com/anoma/smooth-operator","commit_stats":null,"previous_names":["heliaxdev/smooth-operator","anoma/smooth-operator"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/anoma/smooth-operator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anoma%2Fsmooth-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anoma%2Fsmooth-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anoma%2Fsmooth-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anoma%2Fsmooth-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anoma","download_url":"https://codeload.github.com/anoma/smooth-operator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anoma%2Fsmooth-operator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266563915,"owners_count":23948689,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["checked-arithmetic","procedural-macro","rust","syntax"],"created_at":"2025-07-22T20:07:21.966Z","updated_at":"2025-07-22T20:07:22.502Z","avatar_url":"https://github.com/anoma.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# smooth-operator\n\nProcedural macro that transforms regular infix arithmetic expressions into\nchecked arithmetic expressions.\n\n## Example\n\nThe following invocation of `checked!()`:\n\n```rs\nfn the_answer() -\u003e Result\u003ci32, Error\u003e {\n    let answer = checked!(410 / 10 + 1)?;\n    Ok(answer)\n}\n```\n\nResults in this output:\n\n```rs\nfn the_answer() -\u003e Result\u003ci32, Error\u003e {\n    let answer = (|| -\u003e ::core::result::Result\u003c_, crate::Error\u003e {\n        type Err = crate::Error;\n        const ORIGINAL_EXPR: \u0026'static str = \"410 / 10 + 1\";\n        Ok(\n            #[allow(clippy::needless_question_mark)]\n            #[allow(unused_parens)]\n            {\n                410.checked_div(10)\n                    .ok_or(Err {\n                        expr: ORIGINAL_EXPR,\n                        __op_ix: 5usize,\n                        __op_len: 1usize,\n                    })?\n                    .checked_add(1)\n                    .ok_or(Err {\n                        expr: ORIGINAL_EXPR,\n                        __op_ix: 10usize,\n                        __op_len: 1usize,\n                    })?\n            },\n        )\n    })()?;\n    Ok(answer)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanoma%2Fsmooth-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanoma%2Fsmooth-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanoma%2Fsmooth-operator/lists"}