ruff/crates/ruff_source_file/src
Brent Westbrook 1a38831d53
Option::unwrap is now const (#20007)
Summary
--

I noticed while working on #20006 that we had a custom `unwrap` function
for `Option`. This has been const on stable since 1.83
([docs](https://doc.rust-lang.org/std/option/enum.Option.html#method.unwrap),
[release notes](https://blog.rust-lang.org/2024/11/28/Rust-1.83.0/)), so
I think it's safe to use now. I grepped a bit for related todos and
found this one for `AsciiCharSet` but no others.

Test Plan
--

Existing tests
2025-08-20 13:40:49 -04:00
..
lib.rs Update Rust toolchain to 1.89 (#19807) 2025-08-07 18:21:50 +02:00
line_index.rs Option::unwrap is now const (#20007) 2025-08-20 13:40:49 -04:00
line_ranges.rs [pyupgrade] Do not report when a UTF-8 comment is followed by a non-UTF-8 one (UP009) (#14728) 2024-12-11 10:30:41 +00:00
newlines.rs Use #[expect(lint)] over #[allow(lint)] where possible (#17822) 2025-05-03 21:20:31 +02:00