crosvm/sys_util
David Tolnay a70a2193ad sys_util: Enable macros imported individually
The syslog and ioctl macros in sys_util were originally written to be
imported through `#[macro_use] extern crate sys_util` which is
essentially a glob import of all macros from the crate.

In 2018 edition, extern crate is deprecated and macros are imported the
same as any other item. As these sys_util macros are currently written,
importing an individual macro requires the caller to also import any
other sys_util macros that the invocation internally expands to.
Example:

    use sys_util::{error, log};

    fn main() {
        error!("...");
    }

This CL adjusts all sys_util macros to invoke helper macros through a
`$crate::` prefix so that the caller is not required to have the helper
macros in scope themselves.

    use sys_util::error;

    fn main() {
        error!("...");
    }

TEST=kokoro

Change-Id: I2d9f16dca8e7a4a4c0e63d9f10ead9f7413d9c3c
Reviewed-on: https://chromium-review.googlesource.com/1565544
Commit-Ready: David Tolnay <dtolnay@chromium.org>
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: David Tolnay <dtolnay@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2019-04-15 02:06:04 -07:00
..
poll_token_derive cargo: Sort all dependency lists in Cargo.toml 2019-04-09 01:55:14 -07:00
src sys_util: Enable macros imported individually 2019-04-15 02:06:04 -07:00
Cargo.toml cargo: Sort all dependency lists in Cargo.toml 2019-04-09 01:55:14 -07:00