summary refs log tree commit diff
path: root/Cargo.lock
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@chromium.org>2018-12-06 15:50:29 -0800
committerchrome-bot <chrome-bot@chromium.org>2018-12-09 00:48:19 -0800
commitcaf32ee5bb4a662600679aebc78b3339b33e5380 (patch)
tree8170f5b30a1e0967ddce031fb5718372cb62eaad /Cargo.lock
parent088e7f30258a6b55779ccb5551f01322a325f1a8 (diff)
downloadcrosvm-caf32ee5bb4a662600679aebc78b3339b33e5380.tar
crosvm-caf32ee5bb4a662600679aebc78b3339b33e5380.tar.gz
crosvm-caf32ee5bb4a662600679aebc78b3339b33e5380.tar.bz2
crosvm-caf32ee5bb4a662600679aebc78b3339b33e5380.tar.lz
crosvm-caf32ee5bb4a662600679aebc78b3339b33e5380.tar.xz
crosvm-caf32ee5bb4a662600679aebc78b3339b33e5380.tar.zst
crosvm-caf32ee5bb4a662600679aebc78b3339b33e5380.zip
macros: Clean up bitfield macro by replacing the input item
Before:

    #[derive(BitField)]
    #[passthrough(derive(Clone, Copy, PartialEq))]
    pub struct TrbSchema {
        parameter: B64,
        status: B32,
        cycle: B1,
        flags: B9,
        trb_type: B6,
        control: B16,
    }

After:

    #[bitfield]
    #[derive(Clone, Copy, PartialEq)]
    pub struct Trb {
        parameter: B64,
        status: B32,
        cycle: B1,
        flags: B9,
        trb_type: B6,
        control: B16,
    }

This change eliminates the need for the `passthrough` attribute, and
avoids the separate `FooSchema` struct continuing to float around and
disrupt IDE autocomplete.

TEST=`cargo test` the bit_field_derive crate
TEST=`cargo check` the devices crate against a migrated CL:1144264

Change-Id: I950ce896607468c73852aa181827f1a5dc0f0227
Reviewed-on: https://chromium-review.googlesource.com/1366539
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: David Tolnay <dtolnay@chromium.org>
Reviewed-by: Jingkui Wang <jkwang@google.com>
Diffstat (limited to 'Cargo.lock')
0 files changed, 0 insertions, 0 deletions