Skip to content

Commit b689d84

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 c4d191c commit b689d84

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

rosidl_runtime_rs/src/sequence.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,18 @@ impl<T: SequenceAlloc> Clone for Sequence<T> {
111111
}
112112

113113
impl<T: Debug + SequenceAlloc> Debug for Sequence<T> {
114+
/// Formats the sequence using the given formatter.
115+
///
116+
/// This implementation formats the sequence as a slice of its elements.
117+
///
118+
/// # Arguments
119+
///
120+
/// * `&self` - The sequence to be formatted.
121+
/// * `f` - The formatter to use for formatting the sequence.
122+
///
123+
/// # Returns
124+
///
125+
/// A `Result` containing the formatted sequence or an error if formatting failed.
114126
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
115127
self.as_slice().fmt(f)
116128
}

0 commit comments

Comments
 (0)