{"id":15067657,"url":"https://github.com/mzabaluev/unwrap-infallible","last_synced_at":"2025-04-10T14:37:39.118Z","repository":{"id":57671174,"uuid":"218261507","full_name":"mzabaluev/unwrap-infallible","owner":"mzabaluev","description":"Unwrap infallible results with all convenience and no fear","archived":false,"fork":false,"pushed_at":"2019-12-16T09:22:36.000Z","size":25,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T13:11:09.110Z","etag":null,"topics":["convenience","maintainability","rust","rust-lang","rust-library"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mzabaluev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-29T10:30:45.000Z","updated_at":"2025-02-17T14:25:11.000Z","dependencies_parsed_at":"2022-09-10T13:51:07.026Z","dependency_job_id":null,"html_url":"https://github.com/mzabaluev/unwrap-infallible","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mzabaluev%2Funwrap-infallible","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mzabaluev%2Funwrap-infallible/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mzabaluev%2Funwrap-infallible/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mzabaluev%2Funwrap-infallible/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mzabaluev","download_url":"https://codeload.github.com/mzabaluev/unwrap-infallible/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248233958,"owners_count":21069493,"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":["convenience","maintainability","rust","rust-lang","rust-library"],"created_at":"2024-09-25T01:25:38.969Z","updated_at":"2025-04-10T14:37:39.098Z","avatar_url":"https://github.com/mzabaluev.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unwrapping Results With Compile-Time Guarantee of Infallibility\n\nThe Rust standard type `Result` sometimes occurs parameterized\nwith an error type that has no possible values, such as\n`std::convert::Infallible`. Consequently, calling the `unwrap` method on a\n`Result` value of such a type will never panic.\nTherein lies a maintainability hazard: if the error parameter type is later\nchanged to one that can represent actually occurring errors, those uses of\n`unwrap` that could previously be relied upon to be infallible, quietly\nbecome liable to panic.\n\nTo help prevent this from happening without a compile-time safeguard,\nthis crate provides an alternative method `unwrap_infallible` that shall only\nbe available for `Result` values with a known-impossible `Err` variant.\n\n## License\n\nLicensed under either of\n\n * Apache License, Version 2.0\n   ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license\n   ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmzabaluev%2Funwrap-infallible","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmzabaluev%2Funwrap-infallible","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmzabaluev%2Funwrap-infallible/lists"}