Skip to content

Commit 21f801e

Browse files
author
GueLaKais
committed
Added comments to Function
To be honest, I still don't understand exactly what's happening here. All I know is that it's at least somewhat understandable what's going on here.
1 parent a2c98d9 commit 21f801e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

rosidl_runtime_rs/src/sequence.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,17 @@ impl<T: Debug + SequenceAlloc> Debug for Sequence<T> {
130130
}
131131

132132
impl<T: SequenceAlloc> Default for Sequence<T> {
133+
/// Creates a new `Sequence` instance with default values.
134+
///
135+
/// The default `Sequence` has the following properties:
136+
///
137+
/// - `data` is set to a null pointer (`std::ptr::null_mut()`).
138+
/// - `size` is set to 0.
139+
/// - `capacity` is set to 0.
140+
///
141+
/// # Returns
142+
///
143+
/// A new `Sequence` instance with default values.
133144
fn default() -> Self {
134145
Self {
135146
data: std::ptr::null_mut(),

0 commit comments

Comments
 (0)