Skip to content

Commit

Permalink
Added comments to Function
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
GueLaKais committed Jun 24, 2024
1 parent a2c98d9 commit 21f801e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions rosidl_runtime_rs/src/sequence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,17 @@ impl<T: Debug + SequenceAlloc> Debug for Sequence<T> {
}

impl<T: SequenceAlloc> Default for Sequence<T> {
/// Creates a new `Sequence` instance with default values.
///
/// The default `Sequence` has the following properties:
///
/// - `data` is set to a null pointer (`std::ptr::null_mut()`).
/// - `size` is set to 0.
/// - `capacity` is set to 0.
///
/// # Returns
///
/// A new `Sequence` instance with default values.
fn default() -> Self {
Self {
data: std::ptr::null_mut(),
Expand Down

0 comments on commit 21f801e

Please sign in to comment.