more doc
This commit is contained in:
@@ -1,3 +1,19 @@
|
||||
|
||||
/// Create a `HashMap` from a shorthand notation.
|
||||
///
|
||||
/// ```
|
||||
/// #[macro_use]
|
||||
/// extern crate ureq;
|
||||
///
|
||||
/// fn main() {
|
||||
/// let headers = map! {
|
||||
/// "X-API-Key" => "foobar",
|
||||
/// "Accept" => "application/json"
|
||||
/// };
|
||||
///
|
||||
/// let agent = ureq::agent().set_map(headers).build();
|
||||
/// }
|
||||
/// ```
|
||||
#[macro_export]
|
||||
macro_rules! map(
|
||||
{ $($key:expr => $value:expr),* } => {
|
||||
|
||||
Reference in New Issue
Block a user