{"id":17302333,"url":"https://github.com/coriolinus/trait-bound-pretty","last_synced_at":"2025-03-26T22:24:09.860Z","repository":{"id":79236170,"uuid":"303436955","full_name":"coriolinus/trait-bound-pretty","owner":"coriolinus","description":null,"archived":false,"fork":false,"pushed_at":"2020-10-13T12:23:41.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-01T04:16:20.642Z","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/coriolinus.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":"2020-10-12T15:38:05.000Z","updated_at":"2023-09-28T12:03:40.000Z","dependencies_parsed_at":"2023-03-12T07:25:15.543Z","dependency_job_id":null,"html_url":"https://github.com/coriolinus/trait-bound-pretty","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coriolinus%2Ftrait-bound-pretty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coriolinus%2Ftrait-bound-pretty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coriolinus%2Ftrait-bound-pretty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coriolinus%2Ftrait-bound-pretty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coriolinus","download_url":"https://codeload.github.com/coriolinus/trait-bound-pretty/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245744309,"owners_count":20665257,"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-10-15T11:47:14.399Z","updated_at":"2025-03-26T22:24:09.839Z","avatar_url":"https://github.com/coriolinus.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `trait-bound-pretty`\n\nOccasionally, rust hands you errors like this:\n\n```text\nerror[E0277]: the trait bound `Arc\u003csc_service::client::Client\u003csc_client_db::Backend\u003csp_runtime::generic::Block\u003csp_runtime::generic::Header\u003cu32, BlakeTwo256\u003e, OpaqueExtrinsic\u003e\u003e, LocalCallExecutor\u003csc_client_db::Backend\u003csp_runtime::generic::Block\u003csp_runtime::generic::Header\u003cu32, BlakeTwo256\u003e, OpaqueExtrinsic\u003e\u003e, NativeExecutor\u003cExecutor\u003e\u003e, sp_runtime::generic::Block\u003csp_runtime::generic::Header\u003cu32, BlakeTwo256\u003e, OpaqueExtrinsic\u003e, RuntimeApi\u003e\u003e: HeaderBackend\u003csp_runtime::generic::Block\u003csp_runtime::generic::Header\u003cu32, BlakeTwo256\u003e, OpaqueExtrinsic\u003e\u003e` is not satisfied\n```\n\nThis is hard for humans to read. It's somewhat easier if we unpack it into a tree structure:\n\n```text\nerror[E0277]: the item:\n  Arc\u003c\n    sc_service::client::Client\u003c\n      sc_client_db::Backend\u003c\n        sp_runtime::generic::Block\u003c\n          sp_runtime::generic::Header\u003c\n            u32,\n            BlakeTwo256\n          \u003e,\n          OpaqueExtrinsic\n        \u003e\n      \u003e,\n      LocalCallExecutor\u003c\n        sc_client_db::Backend\u003c\n          sp_runtime::generic::Block\u003c\n            sp_runtime::generic::Header\u003c\n              u32,\n              BlakeTwo256\n            \u003e,\n            OpaqueExtrinsic\n          \u003e\n        \u003e,\n        NativeExecutor\u003c\n          Executor\n        \u003e\n      \u003e,\n      sp_runtime::generic::Block\u003c\n        sp_runtime::generic::Header\u003c\n          u32,\n          BlakeTwo256\n        \u003e,\n        OpaqueExtrinsic\n      \u003e,\n      RuntimeApi\n    \u003e\n  \u003e\ndoes not satisfy the trait bound:\n  HeaderBackend\u003c\n    sp_runtime::generic::Block\u003c\n      sp_runtime::generic::Header\u003c\n        u32,\n        BlakeTwo256\n      \u003e,\n      OpaqueExtrinsic\n    \u003e\n  \u003e\n```\n\nThat's what this does.\n\n## Usage\n\nThis executable is a line-oriented stream editor, meaning that you can just feed data through it.\nIf it sees a line which can be parsed as an E0277 or as a type name, it will pretty-print it.\nOtherwise, it just passes the data through unchanged.\n\n### Example: check the current project, expanding E0277\n\n```bash\ncargo check 2\u003e \u003e(trait-bound-pretty)\n```\n\n### Usage Documentation\n\n```text\nUSAGE:\n    trait-bound-pretty [FLAGS]\n\nFLAGS:\n    -b, --bare-item\n            Attempt to parse and print bare items instead of E0277 lines\n\n    -f, --fail-fast\n            If any parse error is produced, abort instead of continuing at the next line\n\n    -h, --help\n            Prints help information\n\n    -s, --strict\n            Activate strict mode\n\n            Normally, any line of input which can't be parsed is passed through unchanged. In strict mode, any line of\n            input which can't be parsed as an E0277 or a Rust type produces an error.\n    -V, --version\n            Prints version information\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoriolinus%2Ftrait-bound-pretty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoriolinus%2Ftrait-bound-pretty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoriolinus%2Ftrait-bound-pretty/lists"}