Skip to content

Commit a2b1d80

Browse files
authored
Merge pull request #141 from epage/template
chore: Update from _rust/main template
2 parents 4f0f08c + 818599e commit a2b1d80

File tree

4 files changed

+9
-41
lines changed

4 files changed

+9
-41
lines changed

.clippy.toml

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
warn-on-all-wildcard-imports = true
21
allow-print-in-tests = true
32
allow-expect-in-tests = true
43
allow-unwrap-in-tests = true

.github/renovate.json5

+1-33
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,6 @@
77
configMigration: true,
88
dependencyDashboard: true,
99
customManagers: [
10-
{
11-
customType: 'regex',
12-
fileMatch: [
13-
'^rust-toolchain\\.toml$',
14-
'Cargo.toml$',
15-
'clippy.toml$',
16-
'\\.clippy.toml$',
17-
'^\\.github/workflows/ci.yml$',
18-
'^\\.github/workflows/rust-next.yml$',
19-
],
20-
matchStrings: [
21-
'MSRV.*?(?<currentValue>\\d+\\.\\d+(\\.\\d+)?)',
22-
'(?<currentValue>\\d+\\.\\d+(\\.\\d+)?).*?MSRV',
23-
],
24-
depNameTemplate: 'MSRV',
25-
packageNameTemplate: 'rust-lang/rust',
26-
datasourceTemplate: 'github-releases',
27-
},
2810
{
2911
customType: 'regex',
3012
fileMatch: [
@@ -45,21 +27,6 @@
4527
},
4628
],
4729
packageRules: [
48-
{
49-
commitMessageTopic: 'MSRV',
50-
matchManagers: [
51-
'custom.regex',
52-
],
53-
matchPackageNames: [
54-
'MSRV',
55-
],
56-
minimumReleaseAge: '126 days', // 3 releases * 6 weeks per release * 7 days per week
57-
internalChecksFilter: 'strict',
58-
extractVersion: '^(?<version>\\d+\\.\\d+)', // Drop the patch version
59-
schedule: [
60-
'* * * * *',
61-
],
62-
},
6330
{
6431
commitMessageTopic: 'Rust Stable',
6532
matchManagers: [
@@ -72,6 +39,7 @@
7239
schedule: [
7340
'* * * * *',
7441
],
42+
automerge: true,
7543
},
7644
// Goals:
7745
// - Keep version reqs low, ignoring compatible normal/build dependencies

Cargo.toml

-5
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ debug_assert_with_mut_call = "warn"
3939
doc_markdown = "warn"
4040
empty_enum = "warn"
4141
enum_glob_use = "warn"
42-
exhaustive_enums = "warn"
43-
exhaustive_structs = "warn"
44-
exit = "warn"
4542
expl_impl_clone_on_copy = "warn"
4643
explicit_deref_methods = "warn"
4744
explicit_into_iter_loop = "warn"
@@ -58,7 +55,6 @@ inconsistent_struct_constructor = "warn"
5855
inefficient_to_string = "warn"
5956
infinite_loop = "warn"
6057
invalid_upcast_comparisons = "warn"
61-
items_after_statements = "warn"
6258
large_digit_groups = "warn"
6359
large_stack_arrays = "warn"
6460
large_types_passed_by_value = "warn"
@@ -89,7 +85,6 @@ string_lit_as_bytes = "warn"
8985
string_to_string = "warn"
9086
todo = "warn"
9187
trait_duplication_in_bounds = "warn"
92-
unwrap_used = "warn"
9388
verbose_file_reads = "warn"
9489
wildcard_imports = "warn"
9590
zero_sized_map_values = "warn"

src/lib.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
4343
#![cfg_attr(feature = "nightly", feature(panic_info_message))]
4444
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
45-
#![warn(missing_docs)]
45+
#![warn(clippy::print_stderr)]
46+
#![warn(clippy::print_stdout)]
4647

4748
pub mod report;
4849
use report::{Method, Report};
@@ -300,7 +301,12 @@ pub fn handle_dump(meta: &Metadata, panic_info: &PanicInfo<'_>) -> Option<PathBu
300301
if let Ok(f) = report.persist() {
301302
Some(f)
302303
} else {
303-
eprintln!(
304+
use std::io::Write as _;
305+
let stderr = std::io::stderr();
306+
let mut stderr = stderr.lock();
307+
308+
let _ = writeln!(
309+
stderr,
304310
"{}",
305311
report
306312
.serialize()

0 commit comments

Comments
 (0)