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>
This commit is contained in:
Kushal Pal
2024-06-24 12:07:30 +00:00
committed by Arthur Cohen
parent 29f847e8b8
commit d9167a76f4
3 changed files with 1 additions and 31 deletions

View File

@@ -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::*;