Skip to content

Commit d1b77ea

Browse files
committed
Skip Codecov upload until repository is public
1 parent 6956ff5 commit d1b77ea

File tree

4 files changed

+29
-26
lines changed

4 files changed

+29
-26
lines changed

.github/workflows/coverage.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ jobs:
5757

5858
- name: Upload coverage to Codecov
5959
uses: codecov/codecov-action@v4
60+
if: ${{ secrets.CODECOV_TOKEN != '' }}
61+
continue-on-error: true
6062
with:
6163
files: lcov.info
62-
fail_ci_if_error: true
64+
fail_ci_if_error: false
6365
token: ${{ secrets.CODECOV_TOKEN }}

tests/src/ast/nodes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ fn test_location_new() {
1515
#[test]
1616
fn test_location_display() {
1717
let loc = Location::new(5, 15, 2, 3, 2, 13, "test source".to_string());
18-
let display = format!("{}", loc);
18+
let display = format!("{loc}");
1919
assert!(display.contains("offset_start: 5"));
2020
assert!(display.contains("offset_end: 15"));
2121
assert!(display.contains("start_line: 2"));
@@ -61,7 +61,7 @@ fn test_location_ne() {
6161
#[test]
6262
fn test_location_debug() {
6363
let loc = Location::new(10, 20, 3, 5, 3, 15, "debug test".to_string());
64-
let debug_str = format!("{:?}", loc);
64+
let debug_str = format!("{loc:?}");
6565
assert!(debug_str.contains("Location"));
6666
assert!(debug_str.contains("offset_start: 10"));
6767
}

tests/src/ast/type_info.rs

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ fn test_type_info_unit() {
77
type_params: vec![],
88
};
99
assert_eq!(ty.kind, TypeInfoKind::Unit);
10-
assert_eq!(format!("{}", ty), "Unit");
10+
assert_eq!(format!("{ty}"), "Unit");
1111
}
1212

1313
#[test]
@@ -16,7 +16,7 @@ fn test_type_info_bool() {
1616
kind: TypeInfoKind::Bool,
1717
type_params: vec![],
1818
};
19-
assert_eq!(format!("{}", ty), "Bool");
19+
assert_eq!(format!("{ty}"), "Bool");
2020
}
2121

2222
#[test]
@@ -25,7 +25,7 @@ fn test_type_info_string() {
2525
kind: TypeInfoKind::String,
2626
type_params: vec![],
2727
};
28-
assert_eq!(format!("{}", ty), "String");
28+
assert_eq!(format!("{ty}"), "String");
2929
}
3030

3131
#[test]
@@ -34,7 +34,7 @@ fn test_type_info_i8() {
3434
kind: TypeInfoKind::Number(NumberTypeKindNumberType::I8),
3535
type_params: vec![],
3636
};
37-
assert_eq!(format!("{}", ty), "i8");
37+
assert_eq!(format!("{ty}"), "i8");
3838
}
3939

4040
#[test]
@@ -43,7 +43,7 @@ fn test_type_info_i16() {
4343
kind: TypeInfoKind::Number(NumberTypeKindNumberType::I16),
4444
type_params: vec![],
4545
};
46-
assert_eq!(format!("{}", ty), "i16");
46+
assert_eq!(format!("{ty}"), "i16");
4747
}
4848

4949
#[test]
@@ -52,7 +52,7 @@ fn test_type_info_i32() {
5252
kind: TypeInfoKind::Number(NumberTypeKindNumberType::I32),
5353
type_params: vec![],
5454
};
55-
assert_eq!(format!("{}", ty), "i32");
55+
assert_eq!(format!("{ty}"), "i32");
5656
}
5757

5858
#[test]
@@ -61,7 +61,7 @@ fn test_type_info_i64() {
6161
kind: TypeInfoKind::Number(NumberTypeKindNumberType::I64),
6262
type_params: vec![],
6363
};
64-
assert_eq!(format!("{}", ty), "i64");
64+
assert_eq!(format!("{ty}"), "i64");
6565
}
6666

6767
#[test]
@@ -70,7 +70,7 @@ fn test_type_info_u8() {
7070
kind: TypeInfoKind::Number(NumberTypeKindNumberType::U8),
7171
type_params: vec![],
7272
};
73-
assert_eq!(format!("{}", ty), "u8");
73+
assert_eq!(format!("{ty}"), "u8");
7474
}
7575

7676
#[test]
@@ -79,7 +79,7 @@ fn test_type_info_u16() {
7979
kind: TypeInfoKind::Number(NumberTypeKindNumberType::U16),
8080
type_params: vec![],
8181
};
82-
assert_eq!(format!("{}", ty), "u16");
82+
assert_eq!(format!("{ty}"), "u16");
8383
}
8484

8585
#[test]
@@ -88,7 +88,7 @@ fn test_type_info_u32() {
8888
kind: TypeInfoKind::Number(NumberTypeKindNumberType::U32),
8989
type_params: vec![],
9090
};
91-
assert_eq!(format!("{}", ty), "u32");
91+
assert_eq!(format!("{ty}"), "u32");
9292
}
9393

9494
#[test]
@@ -97,7 +97,7 @@ fn test_type_info_u64() {
9797
kind: TypeInfoKind::Number(NumberTypeKindNumberType::U64),
9898
type_params: vec![],
9999
};
100-
assert_eq!(format!("{}", ty), "u64");
100+
assert_eq!(format!("{ty}"), "u64");
101101
}
102102

103103
#[test]
@@ -106,7 +106,7 @@ fn test_type_info_custom() {
106106
kind: TypeInfoKind::Custom("MyType".to_string()),
107107
type_params: vec![],
108108
};
109-
assert_eq!(format!("{}", ty), "MyType");
109+
assert_eq!(format!("{ty}"), "MyType");
110110
}
111111

112112
#[test]
@@ -119,7 +119,7 @@ fn test_type_info_array_no_length() {
119119
kind: TypeInfoKind::Array(Box::new(elem_ty), None),
120120
type_params: vec![],
121121
};
122-
assert_eq!(format!("{}", ty), "[i32]");
122+
assert_eq!(format!("{ty}"), "[i32]");
123123
}
124124

125125
#[test]
@@ -132,7 +132,7 @@ fn test_type_info_array_with_length() {
132132
kind: TypeInfoKind::Array(Box::new(elem_ty), Some(10)),
133133
type_params: vec![],
134134
};
135-
assert_eq!(format!("{}", ty), "[i32; 10]");
135+
assert_eq!(format!("{ty}"), "[i32; 10]");
136136
}
137137

138138
#[test]
@@ -141,7 +141,7 @@ fn test_type_info_generic() {
141141
kind: TypeInfoKind::Generic("T".to_string()),
142142
type_params: vec![],
143143
};
144-
assert_eq!(format!("{}", ty), "<T>");
144+
assert_eq!(format!("{ty}"), "<T>");
145145
}
146146

147147
#[test]
@@ -150,7 +150,7 @@ fn test_type_info_qualified_name() {
150150
kind: TypeInfoKind::QualifiedName("std::vec::Vec".to_string()),
151151
type_params: vec![],
152152
};
153-
assert_eq!(format!("{}", ty), "std::vec::Vec");
153+
assert_eq!(format!("{ty}"), "std::vec::Vec");
154154
}
155155

156156
#[test]
@@ -159,7 +159,7 @@ fn test_type_info_qualified() {
159159
kind: TypeInfoKind::Qualified("MyModule::MyType".to_string()),
160160
type_params: vec![],
161161
};
162-
assert_eq!(format!("{}", ty), "MyModule::MyType");
162+
assert_eq!(format!("{ty}"), "MyModule::MyType");
163163
}
164164

165165
#[test]
@@ -168,7 +168,7 @@ fn test_type_info_function() {
168168
kind: TypeInfoKind::Function("my_function".to_string()),
169169
type_params: vec![],
170170
};
171-
assert_eq!(format!("{}", ty), "my_function");
171+
assert_eq!(format!("{ty}"), "my_function");
172172
}
173173

174174
#[test]
@@ -177,7 +177,7 @@ fn test_type_info_struct() {
177177
kind: TypeInfoKind::Struct("Point".to_string()),
178178
type_params: vec![],
179179
};
180-
assert_eq!(format!("{}", ty), "Point");
180+
assert_eq!(format!("{ty}"), "Point");
181181
}
182182

183183
#[test]
@@ -186,7 +186,7 @@ fn test_type_info_enum() {
186186
kind: TypeInfoKind::Enum("Color".to_string()),
187187
type_params: vec![],
188188
};
189-
assert_eq!(format!("{}", ty), "Color");
189+
assert_eq!(format!("{ty}"), "Color");
190190
}
191191

192192
#[test]
@@ -195,7 +195,7 @@ fn test_type_info_spec() {
195195
kind: TypeInfoKind::Spec("MySpec".to_string()),
196196
type_params: vec![],
197197
};
198-
assert_eq!(format!("{}", ty), "MySpec");
198+
assert_eq!(format!("{ty}"), "MySpec");
199199
}
200200

201201
#[test]
@@ -204,7 +204,7 @@ fn test_type_info_with_type_params() {
204204
kind: TypeInfoKind::Custom("Vec".to_string()),
205205
type_params: vec!["T".to_string(), "U".to_string()],
206206
};
207-
assert_eq!(format!("{}", ty), "Vec<T, U>");
207+
assert_eq!(format!("{ty}"), "Vec<T, U>");
208208
}
209209

210210
#[test]
@@ -260,7 +260,7 @@ fn test_nested_array_types() {
260260
kind: TypeInfoKind::Array(Box::new(middle_array), Some(10)),
261261
type_params: vec![],
262262
};
263-
assert_eq!(format!("{}", outer_array), "[[i32; 5]; 10]");
263+
assert_eq!(format!("{outer_array}"), "[[i32; 5]; 10]");
264264
}
265265

266266
#[test]

tests/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//! This module contains various infc end to end tests
22
#![allow(dead_code)]
3+
#![allow(unused_imports)]
34

45
mod ast;
56
mod codegen;

0 commit comments

Comments
 (0)