diff --git a/crates/scion-proto/src/path/standard.rs b/crates/scion-proto/src/path/standard.rs index 35183b8..6bdded7 100644 --- a/crates/scion-proto/src/path/standard.rs +++ b/crates/scion-proto/src/path/standard.rs @@ -277,6 +277,9 @@ where /// Creates new StandardPath, backed by the provided buffer, by copying and reversing this one. /// + /// The reversed path is suitable for use from an end-host: its current hop and info field + /// indices are set to 0. + /// /// # Panics /// /// Panics if the provided buffer does not have the same length as self.raw(). @@ -301,9 +304,8 @@ where /// Reverses both the raw path and the metadata in the [`Self::meta_header`]. /// - /// Can panic if the meta header is inconsistent with the encoded path or the encoded path - /// itself is inconsistent (e.g., the `current_info_field` points to an empty segment). - // TODO(jsmith): Check if this panic is actually possible + /// The reversed path is suitable for use from an end-host: its current hop and info field + /// indices are set to 0. pub fn to_reversed(&self) -> StandardPath { let mut encoded_path = vec![0u8; self.encoded_path.len()]; let StandardPath { meta_header, .. } = self.reverse_to_slice(&mut encoded_path);