diff options
| author | Kushal Pal <kushalpal109@gmail.com> | 2024-06-24 12:07:30 +0000 |
|---|---|---|
| committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2025-03-17 16:35:52 +0100 |
| commit | d9167a76f4dc2d3060becb8a8fa47d49d827d213 (patch) | |
| tree | 4518a7ede3f848d2b56570fb71f5d28f0afc5186 /libgrust/libformat_parser/generic_format_parser | |
| parent | 29f847e8b8cf21c12d07f2eec6a53f8bccdffeac (diff) | |
gccrs: Fix nightly rustc warnings
libgrust/ChangeLog:
* libformat_parser/Cargo.toml:
Used crate-type instead of depricated crate_type.
* libformat_parser/generic_format_parser/src/lib.rs:
Remove dead code.
* libformat_parser/src/lib.rs: Likewise.
Signed-off-by: Kushal Pal <kushalpal109@gmail.com>
Diffstat (limited to 'libgrust/libformat_parser/generic_format_parser')
| -rw-r--r-- | libgrust/libformat_parser/generic_format_parser/src/lib.rs | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/libgrust/libformat_parser/generic_format_parser/src/lib.rs b/libgrust/libformat_parser/generic_format_parser/src/lib.rs index e255bf16908..25f6b0ead17 100644 --- a/libgrust/libformat_parser/generic_format_parser/src/lib.rs +++ b/libgrust/libformat_parser/generic_format_parser/src/lib.rs @@ -22,22 +22,6 @@ fn is_id_continue(c: char) -> bool { unicode_xid::UnicodeXID::is_xid_continue(c) } -// Workaround for Ubuntu 18.04. 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 reimplementation, -// directly taken from the standard library sources -trait IsSomeAnd<T> { - fn is_some_and(self, f: impl FnOnce(T) -> bool) -> bool; -} - -impl<T> IsSomeAnd<T> for Option<T> { - fn is_some_and(self, f: impl FnOnce(T) -> bool) -> bool { - match self { - None => false, - Some(x) => f(x), - } - } -} - // use rustc_lexer::unescape; pub use Alignment::*; pub use Count::*; |
