We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b87748e commit 61c2f0aCopy full SHA for 61c2f0a
src/payload.rs
@@ -63,6 +63,11 @@ impl Payload {
63
Self(HashMap::new())
64
}
65
66
+ /// Construct a new empty payload object with at least the specified capacity.
67
+ pub fn with_capacity(capacity: usize) -> Self {
68
+ Self(HashMap::with_capacity(capacity))
69
+ }
70
+
71
/// Construct a payload object from the given hash map
72
#[deprecated(since = "1.10.0", note = "use `Payload::from` instead")]
73
pub fn new_from_hashmap(payload: HashMap<String, Value>) -> Self {
0 commit comments