Skip to content

Commit 4081118

Browse files
committed
refactor: use better function name
1 parent 4c1fde2 commit 4081118

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/app.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,25 +149,25 @@ impl App {
149149
}
150150

151151
trait GetSizeUtils: GetSize<Size: size::Size> {
152-
fn format_size(bytes_format: BytesFormat) -> <Self::Size as size::Size>::DisplayFormat;
152+
fn formatter(bytes_format: BytesFormat) -> <Self::Size as size::Size>::DisplayFormat;
153153
}
154154

155155
impl GetSizeUtils for GetApparentSize {
156-
fn format_size(bytes_format: BytesFormat) -> BytesFormat {
156+
fn formatter(bytes_format: BytesFormat) -> BytesFormat {
157157
bytes_format
158158
}
159159
}
160160

161161
#[cfg(unix)]
162162
impl GetSizeUtils for GetBlockSize {
163-
fn format_size(bytes_format: BytesFormat) -> BytesFormat {
163+
fn formatter(bytes_format: BytesFormat) -> BytesFormat {
164164
bytes_format
165165
}
166166
}
167167

168168
#[cfg(unix)]
169169
impl GetSizeUtils for GetBlockCount {
170-
fn format_size(_: BytesFormat) {}
170+
fn formatter(_: BytesFormat) {}
171171
}
172172

173173
macro_rules! run {
@@ -193,7 +193,7 @@ impl App {
193193
bar_alignment: BarAlignment::from_align_right(align_right),
194194
size_getter: $size_getter,
195195
reporter: <() as CreateReporter<$progress, <$size_getter as GetSize>::Size>>::create_reporter(report_error),
196-
bytes_format: <$size_getter as GetSizeUtils>::format_size(bytes_format),
196+
bytes_format: <$size_getter as GetSizeUtils>::formatter(bytes_format),
197197
files,
198198
json_output,
199199
column_width_distribution,

0 commit comments

Comments
 (0)