Skip to content

Consider default BSize<T> with T = usize? #5

@tisonkun

Description

@tisonkun

So far, we have

bsize/bsize/src/types.rs

Lines 20 to 22 in 841a1de

/// Byte size representation.
#[derive(Default, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct BSize<T: Unsigned>(pub T);

I'm considering whether it is desired to default:

- pub struct BSize<T: Unsigned>(pub T); 
+ pub struct BSize<T: Unsigned = usize>(pub T); 

Explicitly is good, and I doubt whether usize is the right default here. So I'm not implementing it right now.

Open for discussion and feedback.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions