]> git.ipfire.org Git - thirdparty/gcc.git/commit
format-parser: Add `is_some_and` method for Option<T>
authorArthur Cohen <arthur.cohen@embecosm.com>
Mon, 26 Feb 2024 10:55:47 +0000 (11:55 +0100)
committerCohenArthur <arthur.cohen@embecosm.com>
Mon, 26 Feb 2024 17:32:38 +0000 (17:32 +0000)
commitfa2a861457838515d3a0a4693c32b0f04cf5e29a
tree55d5ae8742afa8305f48101493acd63995ce622d
parent25839a8761ad7626cdb778304610162dfe38d91e
format-parser: Add `is_some_and` method for Option<T>

Workaround for Ubuntu 18.04, since we still use it for the GCC 4.8 CI.
The default Rust package is 1.65 (and unlikely to change I assume?),
but the generic format parser library uses `is_some_and` which was
introduced in 1.70. So this is a simple reimplementation, directly taken
from the standard library sources.

libgrust/ChangeLog:

* libformat_parser/generic_format_parser/src/lib.rs: Add IsSomeAnd<T>
trait, impl it for Option<T>.
libgrust/libformat_parser/generic_format_parser/src/lib.rs