Skip to content

Commit 362a676

Browse files
GearsDatapackslpil
authored andcommitted
Fix clippy lints for Rust 1.91
1 parent 7644065 commit 362a676

File tree

3 files changed

+7
-15
lines changed

3 files changed

+7
-15
lines changed

compiler-core/src/analyse.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@ use vec1::Vec1;
5151

5252
use self::imports::Importer;
5353

54-
#[derive(Debug, Clone, PartialEq, Eq)]
54+
#[derive(Debug, Clone, PartialEq, Eq, Default)]
5555
pub enum Inferred<T> {
5656
Known(T),
57+
#[default]
5758
Unknown,
5859
}
5960

compiler-core/src/ast.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2522,12 +2522,6 @@ impl<T> BitArraySize<T> {
25222522
}
25232523
}
25242524

2525-
impl Default for Inferred<()> {
2526-
fn default() -> Self {
2527-
Self::Unknown
2528-
}
2529-
}
2530-
25312525
pub type TypedTailPattern = TailPattern<Arc<Type>>;
25322526

25332527
pub type UntypedTailPattern = TailPattern<()>;

compiler-core/src/type_.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1375,10 +1375,13 @@ pub struct ValueConstructor {
13751375
pub type_: Arc<Type>,
13761376
}
13771377

1378-
#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
1378+
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Default)]
13791379
pub enum Deprecation {
1380+
#[default]
13801381
NotDeprecated,
1381-
Deprecated { message: EcoString },
1382+
Deprecated {
1383+
message: EcoString,
1384+
},
13821385
}
13831386

13841387
impl Deprecation {
@@ -1391,12 +1394,6 @@ impl Deprecation {
13911394
}
13921395
}
13931396

1394-
impl Default for Deprecation {
1395-
fn default() -> Self {
1396-
Self::NotDeprecated
1397-
}
1398-
}
1399-
14001397
impl ValueConstructor {
14011398
pub fn local_variable(location: SrcSpan, origin: VariableOrigin, type_: Arc<Type>) -> Self {
14021399
Self {

0 commit comments

Comments
 (0)