Crates.io | qs-rs |
lib.rs | qs-rs |
version | 0.1.4 |
source | src |
created_at | 2021-06-23 02:22:33.88042 |
updated_at | 2021-12-08 02:44:25.345168 |
description | convert to query string |
homepage | |
repository | https://gitee.com/turbidsoul/qs-rs |
max_upload_size | |
id | 413734 |
size | 20,072 |
let x = 1;
let s = stringify!(
"a" => x,
"b" => 2,
"c" => 3,
"d" => "name age"
);
assert_eq!(s, "a=1&b=2&c=3&d=name+age");
let mut m = BTreeMap::new();
m.insert("a", 1);
m.insert("b", 2);
m.insert("c", 3);
let s = stringify!(m);
assert_eq!(s, "a=1&b=2&c=3");
let s = stringify![
("a", 1),
("b", 2),
("c", 3)
];
assert_eq!(s, "a=1&b=2&c=3");