Bump clippy msrv to 1.64
the msrv was bumped in in the Cargo.toml #847 but not in clippy.toml, clippy was complaining at startup and defaulting to 1.57
This commit is contained in:
committed by
Emilio Cobos Álvarez
parent
43af1ebe6e
commit
85eb0f4436
+1
-1
@@ -1,2 +1,2 @@
|
||||
# Specify the minimum supported Rust version
|
||||
msrv = "1.57.0"
|
||||
msrv = "1.64.0"
|
||||
|
||||
+4
-13
@@ -61,8 +61,10 @@ impl Language {
|
||||
/// Controls what type of line endings are used in the generated code.
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
#[allow(clippy::upper_case_acronyms)]
|
||||
#[derive(Default)]
|
||||
pub enum LineEndingStyle {
|
||||
/// Use Unix-style linefeed characters
|
||||
#[default]
|
||||
LF,
|
||||
/// Use classic Mac-style carriage-return characters
|
||||
CR,
|
||||
@@ -72,12 +74,6 @@ pub enum LineEndingStyle {
|
||||
Native,
|
||||
}
|
||||
|
||||
impl Default for LineEndingStyle {
|
||||
fn default() -> Self {
|
||||
LineEndingStyle::LF
|
||||
}
|
||||
}
|
||||
|
||||
impl LineEndingStyle {
|
||||
pub fn as_str(&self) -> &'static str {
|
||||
match self {
|
||||
@@ -213,8 +209,9 @@ impl FromStr for DocumentationLength {
|
||||
deserialize_enum_str!(DocumentationLength);
|
||||
|
||||
/// A style of Style to use when generating structs and enums.
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Default)]
|
||||
pub enum Style {
|
||||
#[default]
|
||||
Both,
|
||||
Tag,
|
||||
Type,
|
||||
@@ -245,12 +242,6 @@ impl Style {
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for Style {
|
||||
fn default() -> Self {
|
||||
Style::Both
|
||||
}
|
||||
}
|
||||
|
||||
impl FromStr for Style {
|
||||
type Err = String;
|
||||
|
||||
|
||||
@@ -6,19 +6,14 @@ use syn::ext::IdentExt;
|
||||
|
||||
use crate::bindgen::ir::ty::{IntKind, PrimitiveType};
|
||||
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Default)]
|
||||
pub enum ReprStyle {
|
||||
#[default]
|
||||
Rust,
|
||||
C,
|
||||
Transparent,
|
||||
}
|
||||
|
||||
impl Default for ReprStyle {
|
||||
fn default() -> Self {
|
||||
ReprStyle::Rust
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
|
||||
pub struct ReprType {
|
||||
kind: IntKind,
|
||||
|
||||
@@ -28,9 +28,10 @@ impl<'a> IdentifierType<'a> {
|
||||
}
|
||||
|
||||
/// A rule to apply to an identifier when generating bindings.
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
#[derive(Debug, Clone, Copy, Default)]
|
||||
pub enum RenameRule {
|
||||
/// Do not apply any renaming. The default.
|
||||
#[default]
|
||||
None,
|
||||
/// Converts the identifier to PascalCase and adds a context dependent prefix
|
||||
GeckoCase,
|
||||
@@ -93,12 +94,6 @@ impl RenameRule {
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for RenameRule {
|
||||
fn default() -> RenameRule {
|
||||
RenameRule::None
|
||||
}
|
||||
}
|
||||
|
||||
impl FromStr for RenameRule {
|
||||
type Err = String;
|
||||
|
||||
|
||||
@@ -93,7 +93,6 @@ fn test_project(project_path: &str) {
|
||||
);
|
||||
|
||||
std::fs::remove_dir_all(build_dir).expect("Failed to remove old build directory");
|
||||
()
|
||||
}
|
||||
|
||||
macro_rules! test_file {
|
||||
|
||||
+1
-1
@@ -251,7 +251,7 @@ fn run_compile_test(
|
||||
);
|
||||
if generate_depfile {
|
||||
let depfile = depfile_contents.expect("No depfile generated");
|
||||
assert!(depfile.len() > 0);
|
||||
assert!(!depfile.is_empty());
|
||||
let mut rules = depfile.split(':');
|
||||
let target = rules.next().expect("No target found");
|
||||
assert_eq!(target, generated_file.as_os_str().to_str().unwrap());
|
||||
|
||||
Reference in New Issue
Block a user