Skip to content

Commit e8afb62

Browse files
chore: reduce some vis. for updated unreachable_pub lint
1 parent 76eb077 commit e8afb62

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

src/config/file_lines.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ use thiserror::Error;
1313

1414
/// A range of lines in a file, inclusive of both ends.
1515
pub struct LineRange {
16-
pub file: Lrc<SourceFile>,
17-
pub lo: usize,
18-
pub hi: usize,
16+
pub(crate) file: Lrc<SourceFile>,
17+
pub(crate) lo: usize,
18+
pub(crate) hi: usize,
1919
}
2020

2121
/// Defines the name of an input - either a file or stdin.
@@ -75,7 +75,7 @@ impl Serialize for FileName {
7575
}
7676

7777
impl LineRange {
78-
pub fn file_name(&self) -> FileName {
78+
pub(crate) fn file_name(&self) -> FileName {
7979
self.file.name.clone().into()
8080
}
8181
}

src/config/options.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -218,24 +218,24 @@ pub enum Verbosity {
218218
pub struct WidthHeuristics {
219219
// Maximum width of the args of a function call before falling back
220220
// to vertical formatting.
221-
pub fn_call_width: usize,
221+
pub(crate) fn_call_width: usize,
222222
// Maximum width of the args of a function-like attributes before falling
223223
// back to vertical formatting.
224-
pub attr_fn_like_width: usize,
224+
pub(crate) attr_fn_like_width: usize,
225225
// Maximum width in the body of a struct lit before falling back to
226226
// vertical formatting.
227-
pub struct_lit_width: usize,
227+
pub(crate) struct_lit_width: usize,
228228
// Maximum width in the body of a struct variant before falling back
229229
// to vertical formatting.
230-
pub struct_variant_width: usize,
230+
pub(crate) struct_variant_width: usize,
231231
// Maximum width of an array literal before falling back to vertical
232232
// formatting.
233-
pub array_width: usize,
233+
pub(crate) array_width: usize,
234234
// Maximum length of a chain to fit on a single line.
235-
pub chain_width: usize,
235+
pub(crate) chain_width: usize,
236236
// Maximum line length for single line if-else expressions. A value
237237
// of zero means always break if-else expressions.
238-
pub single_line_if_else_max_width: usize,
238+
pub(crate) single_line_if_else_max_width: usize,
239239
}
240240

241241
impl fmt::Display for WidthHeuristics {

src/rustfmt_diff.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@ use std::io::Write;
66
use crate::config::{Color, Config, Verbosity};
77

88
#[derive(Debug, PartialEq)]
9-
pub enum DiffLine {
9+
pub(crate) enum DiffLine {
1010
Context(String),
1111
Expected(String),
1212
Resulting(String),
1313
}
1414

1515
#[derive(Debug, PartialEq)]
16-
pub struct Mismatch {
16+
pub(crate) struct Mismatch {
1717
/// The line number in the formatted version.
18-
pub line_number: u32,
18+
pub(crate) line_number: u32,
1919
/// The line number in the original version.
20-
pub line_number_orig: u32,
20+
pub(crate) line_number_orig: u32,
2121
/// The set of lines (context and old/new) in the mismatch.
22-
pub lines: Vec<DiffLine>,
22+
pub(crate) lines: Vec<DiffLine>,
2323
}
2424

2525
impl Mismatch {

0 commit comments

Comments
 (0)