We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 867cedc commit 2018225Copy full SHA for 2018225
capnp/src/message.rs
@@ -765,6 +765,15 @@ impl Builder<HeapAllocator> {
765
/// Constructs a new `message::Builder<HeapAllocator>` whose first segment has length
766
/// `SUGGESTED_FIRST_SEGMENT_WORDS`.
767
pub fn new_default() -> Self {
768
+ Default::default()
769
+ }
770
+}
771
+
772
+#[cfg(feature = "alloc")]
773
+impl Default for Builder<HeapAllocator> {
774
+ /// Constructs a new `message::Builder<HeapAllocator>` whose first segment has length
775
+ /// `SUGGESTED_FIRST_SEGMENT_WORDS`.
776
+ fn default() -> Self {
777
Self::new(HeapAllocator::new())
778
}
779
0 commit comments