In rust the in order to see the expansion of the macros like println! we can use the rust-expand crate
First install the crate
cargo install cargo-expand
then use cargo expand command
#!/bin/bash | |
# Wraps aursync command to mount an amazon s3 bucket which contains a repository | |
set -uo pipefail | |
trap 's=$?; echo "$0: Error on line "$LINENO": $BASH_COMMAND"; exit $s' ERR | |
INTERFACE=wlp58s0 | |
wpa() { | |
wpa_cli -i "${INTERFACE}" "$@" | |
} |
In rust the in order to see the expansion of the macros like println! we can use the rust-expand crate
First install the crate
cargo install cargo-expand
then use cargo expand command
[dependencies]
libc = "0.2"
extern crate libc;
use std::mem;
use std::os::unix::io::AsRawFd;
[dependencies]
quote = "1.0"
use quote::quote;
fn main() {
let field1 = quote! { x: u32 };