{"id":50783941,"url":"https://github.com/antonio-hickey/or-panic","last_synced_at":"2026-06-12T06:02:01.765Z","repository":{"id":324849617,"uuid":"1098777439","full_name":"antonio-hickey/or-panic","owner":"antonio-hickey","description":null,"archived":false,"fork":false,"pushed_at":"2025-11-18T06:47:07.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-18T08:22:56.852Z","etag":null,"topics":["dx","extension","option","panic","result","rust"],"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/antonio-hickey.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-18T06:05:55.000Z","updated_at":"2025-11-18T06:47:10.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/antonio-hickey/or-panic","commit_stats":null,"previous_names":["antonio-hickey/or-panic"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/antonio-hickey/or-panic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonio-hickey%2For-panic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonio-hickey%2For-panic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonio-hickey%2For-panic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonio-hickey%2For-panic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antonio-hickey","download_url":"https://codeload.github.com/antonio-hickey/or-panic/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonio-hickey%2For-panic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34231212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["dx","extension","option","panic","result","rust"],"created_at":"2026-06-12T06:01:25.458Z","updated_at":"2026-06-12T06:01:57.088Z","avatar_url":"https://github.com/antonio-hickey.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"or-panic 🫨🤯\n===\n\n\u003cp align=\"center\"\u003e\n    \u003cimg alt=\"dependency count\" src=\"https://img.shields.io/deps-rs/repo/github/antonio-hickey/or-panic?style=for-the-badge\" height=\"20\"\u003e\n    \u003cimg alt=\"size\" src=\"https://img.shields.io/crates/size/or-panic?style=for-the-badge\" height=\"20\"\u003e\n    \u003cimg alt=\"license\" src=\"https://img.shields.io/crates/l/or-panic?style=for-the-badge\" height=\"20\"\u003e\n    \u003cimg alt=\"build status\" src=\"https://img.shields.io/github/actions/workflow/status/antonio-hickey/or-panic/ci.yml?style=for-the-badge\" height=\"20\"\u003e\n\u003c/p\u003e\n\nA tiny extension trait that adds idiomatic `.or_panic(..)` methods to `Option` and `Result`.\n\n```toml\n[dependencies]\nor-panic = \"1.0.0\"\n```\n\n## Example\n```rust\nuse or_panic::ResultOrPanic;\n\nfn main() {\n    let duration = std::time::SystemTime::now()\n        .duration_since(std::time::UNIX_EPOCH)\n        .or_panic(\"oh no, the chrono demons have reversed the fabric of time\");\n\n    let secs = duration.as_secs();\n    println!(\"Seconds since epoch: {secs}\");\n}\n```\n\n## Features\n- Ergonomic unwrapping\n- Works with any `Display`\n- Pretty panic messages with `Result`\n- Context on the exact line of panic\n- Optional `no_std` support\n    - enabled via: \n      ```\n      default-features = false\n      features = [\"no_std\"]   \n      ```\n\n## Quick Start\nAdd the crate to your `Cargo.toml`:\n```toml\n[dependencies]\nor-panic = \"1.0.0\"\n```\n\nImport the traits:\n```rust\nuse or_panic::prelude::*;\n```\n\nUse it:\n```\nlet host = std::env::var(\"HOST\")\n    .or_panic(\"HOST environment variable must be set\");\n```\n\n## no_std support\n`or-panic` supports `no_std` environments.\n\nEnable `no_std` mode like so:\n```toml\n[dependencies]\nor-panic = { version = \"1.0.0\", default-features = false, features = [\"no_std\"] }\n```\n\n\u003cbr\u003e\n\n#### License\n\n\u003csup\u003e\nLicensed under either of \u003ca href=\"LICENSE-APACHE\"\u003eApache License, Version\n2.0\u003c/a\u003e or \u003ca href=\"LICENSE-MIT\"\u003eMIT license\u003c/a\u003e at your option.\n\u003c/sup\u003e\n\n\u003cbr\u003e\n\n\u003csub\u003e\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in this crate by you, as defined in the Apache-2.0 license, shall\nbe dual licensed as above, without any additional terms or conditions.\n\u003c/sub\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonio-hickey%2For-panic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantonio-hickey%2For-panic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonio-hickey%2For-panic/lists"}