{"id":20145864,"url":"https://github.com/usagi/to_unit","last_synced_at":"2025-04-09T19:20:41.358Z","repository":{"id":62444362,"uuid":"486033874","full_name":"usagi/to_unit","owner":"usagi","description":null,"archived":false,"fork":false,"pushed_at":"2022-04-27T11:29:56.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-23T21:11:23.240Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/usagi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-27T03:38:36.000Z","updated_at":"2023-01-16T13:17:04.000Z","dependencies_parsed_at":"2022-11-01T23:33:43.564Z","dependency_job_id":null,"html_url":"https://github.com/usagi/to_unit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usagi%2Fto_unit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usagi%2Fto_unit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usagi%2Fto_unit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usagi%2Fto_unit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/usagi","download_url":"https://codeload.github.com/usagi/to_unit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248094994,"owners_count":21046770,"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":[],"created_at":"2024-11-13T22:18:28.670Z","updated_at":"2025-04-09T19:20:41.329Z","avatar_url":"https://github.com/usagi.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![github]](https://github.com/usagi/ToUnit)\u0026ensp;[![crates-io]](https://crates.io/crates/ToUnit)\u0026ensp;[![docs-rs]](https://docs.rs/ToUnit)\u003cbr\u003e\n[![Build Status](https://travis-ci.org/usagi/ToUnit.svg?branch=master)](https://travis-ci.org/usagi/ToUnit)\n\n[github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge\u0026labelColor=555555\u0026logo=github\n[crates-io]: https://img.shields.io/badge/crates.io-fc8d62?style=for-the-badge\u0026labelColor=555555\u0026logo=rust\n[docs-rs]: https://img.shields.io/badge/docs.rs-66c2a5?style=for-the-badge\u0026labelColor=555555\u0026logoColor=white\u0026logo=data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDUxMiA1MTIiPjxwYXRoIGZpbGw9IiNmNWY1ZjUiIGQ9Ik00ODguNiAyNTAuMkwzOTIgMjE0VjEwNS41YzAtMTUtOS4zLTI4LjQtMjMuNC0zMy43bC0xMDAtMzcuNWMtOC4xLTMuMS0xNy4xLTMuMS0yNS4zIDBsLTEwMCAzNy41Yy0xNC4xIDUuMy0yMy40IDE4LjctMjMuNCAzMy43VjIxNGwtOTYuNiAzNi4yQzkuMyAyNTUuNSAwIDI2OC45IDAgMjgzLjlWMzk0YzAgMTMuNiA3LjcgMjYuMSAxOS45IDMyLjJsMTAwIDUwYzEwLjEgNS4xIDIyLjEgNS4xIDMyLjIgMGwxMDMuOS01MiAxMDMuOSA1MmMxMC4xIDUuMSAyMi4xIDUuMSAzMi4yIDBsMTAwLTUwYzEyLjItNi4xIDE5LjktMTguNiAxOS45LTMyLjJWMjgzLjljMC0xNS05LjMtMjguNC0yMy40LTMzLjd6TTM1OCAyMTQuOGwtODUgMzEuOXYtNjguMmw4NS0zN3Y3My4zek0xNTQgMTA0LjFsMTAyLTM4LjIgMTAyIDM4LjJ2LjZsLTEwMiA0MS40LTEwMi00MS40di0uNnptODQgMjkxLjFsLTg1IDQyLjV2LTc5LjFsODUtMzguOHY3NS40em0wLTExMmwtMTAyIDQxLjQtMTAyLTQxLjR2LS42bDEwMi0zOC4yIDEwMiAzOC4ydi42em0yNDAgMTEybC04NSA0Mi41di03OS4xbDg1LTM4Ljh2NzUuNHptMC0xMTJsLTEwMiA0MS40LTEwMi00MS40di0uNmwxMDItMzguMiAxMDIgMzguMnYuNnoiPjwvcGF0aD48L3N2Zz4K\n\n# ToUnit; drop to the trash syntax sugar for any types.\n\n## Example\n\n```rust\nuse to_unit::ToUnit;\n// or, `use to_unit::ToUnit as __` for ultra lzay persons!\n\n#[test]\nfn match_arms_to_easily()\n{\n use std::collections::HashMap;\n let mut x = HashMap::\u003cString, i32\u003e::new();\n x.insert(\"neko\".to_string(), 123);\n match x.get_mut(\"neko\")\n {\n  Some(v) =\u003e *v = 222,\n  None =\u003e x.insert(\"neko\".to_string(), 222).to_unit() // \u003c-- here!\n }\n // Ofcorse alternatively, you can write:\n //  eg. None =\u003e { x.insert(\"neko\".to_string(), 222); }\n // But, it might be fix to a multi-line format by rust-fmt then...:\n //  eg. None =\u003e {\n //          x.insert(\"neko\".to_string(), 222);\n //      }\n // I don't like the multi-line behaviors, so I made the __ lib.\n //\n}\n```\n\n## LICENSE\n\n- [MIT](LICENSE.md)\n\n## Author\n\n- USAGI.NETWORK / Usagi Ito \u003chttps://github.com/usagi/\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusagi%2Fto_unit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fusagi%2Fto_unit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusagi%2Fto_unit/lists"}