Skip to content

Commit 534fd7f

Browse files
committed
refactor: create an alias
1 parent b42e81f commit 534fd7f

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/app.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,14 @@ impl App {
126126
pub const BLOCK_COUNT: u8 = 2;
127127
}
128128

129+
type SizeGetterToDisplayFormat<SizeGetter> =
130+
<<SizeGetter as GetSize>::Size as size::Size>::DisplayFormat;
131+
129132
trait QuantityUtils<const INDEX: u8> {
130133
const QUANTITY: Quantity;
131134
type SizeGetter: GetSize<Size: size::Size>;
132135
const SIZE_GETTER: Self::SizeGetter;
133-
fn formatter(
134-
bytes_format: BytesFormat,
135-
) -> <<Self::SizeGetter as GetSize>::Size as size::Size>::DisplayFormat;
136+
fn formatter(bytes_format: BytesFormat) -> SizeGetterToDisplayFormat<Self::SizeGetter>;
136137
}
137138

138139
impl QuantityUtils<{ quantity_index::APPARENT_SIZE }> for () {

0 commit comments

Comments
 (0)