Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why it is 6 but not 3? #203

Closed
goldwind-ting opened this issue Dec 4, 2022 · 1 comment
Closed

Why it is 6 but not 3? #203

goldwind-ting opened this issue Dec 4, 2022 · 1 comment

Comments

@goldwind-ting
Copy link

#[test]
fn test_bitvec(){
    let bits = bits![0, 1, 1];
    for bc in bits.chunks(3){
        let n: u8 = bc.load_be();
        println!("{}", n); // output: 6
    };
}

I am confused, why it is 6?

@goldwind-ting
Copy link
Author

Got it, it is because the order Lsb0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant