)]}'
{
  "commit": "fdd9f4e9407654eed2352cc80c799d239d3c1f57",
  "tree": "2de790231c10788c244240514bccc9d028c2fd2a",
  "parents": [
    "512551c839fc711fc925c8a862a9abd4bde0812f",
    "8d3b3fe571a8b1af105cd6b7eae5448b2054979a"
  ],
  "author": {
    "name": "Ada Alakbarova",
    "email": "58857108+ada4a@users.noreply.github.com",
    "time": "Wed May 27 20:48:30 2026 +0000"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed May 27 20:48:30 2026 +0000"
  },
  "message": "Added new lint for `map_or(..., identity)` (#16052)\n\n*[View all\ncomments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust-clippy/pull/16052)*\n\nIntroduce a new lint for mapping the identity function with `map_or`\nover `Option` and `Result`.\n\nLints:\n```rust\nfn foo(opt: Option\u003ci32\u003e, default: i32) -\u003e i32 {\n    opt.map_or(default, |o| o)\n}\n```\nInto\n```rust\nfn foo(opt: Option\u003ci32\u003e, default: i32) -\u003e i32 {\n    opt.unwrap_or(default)\n}\n```\n\nFixes rust-lang/rust-clippy#15801\n\nWe had some discussions with @ada4a about naming on issue\nrust-lang/rust-clippy#15801 , a summary\n[here](https://github.com/rust-lang/rust-clippy/issues/15801#issuecomment-3422324883).\n\nThere\u0027s a question about naming for this lint, there\u0027s already\n`unnecessary_option_map_or_else` and `unnecessary_result_map_or_else`,\nbut I think having two lints doesn\u0027t make sense in this case.\n`unnecessary_map_or` could be a reasonable name for this new lint, but\nit\u0027s already\n[taken](https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or)\n\nchangelog: [`map_or_identity`]: new lint\n",
  "tree_diff": []
}
