File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -74,20 +74,20 @@ impl SerializableModule {
74
74
///
75
75
/// # Safety
76
76
///
77
- /// This method is unsafe.
78
- /// Please check `SerializableModule::archive_from_slice` for more details.
77
+ /// This method is unsafe since it deserializes data directly
78
+ /// from memory.
79
+ /// Right now we are not doing any extra work for validation, but
80
+ /// `rkyv` has an option to do bytecheck on the serialized data before
81
+ /// serializing (via `rkyv::check_archived_value`).
79
82
pub unsafe fn deserialize ( metadata_slice : & [ u8 ] ) -> Result < Self , DeserializeError > {
80
83
let archived = Self :: archive_from_slice ( metadata_slice) ?;
81
84
Self :: deserialize_from_archive ( archived)
82
85
}
83
86
84
87
/// # Safety
85
88
///
86
- /// This method is unsafe since it deserializes data directly
87
- /// from memory.
88
- /// Right now we are not doing any extra work for validation, but
89
- /// `rkyv` has an option to do bytecheck on the serialized data before
90
- /// serializing (via `rkyv::check_archived_value`).
89
+ /// This method is unsafe.
90
+ /// Please check `SerializableModule::deserialize` for more details.
91
91
unsafe fn archive_from_slice < ' a > (
92
92
metadata_slice : & ' a [ u8 ] ,
93
93
) -> Result < & ' a ArchivedSerializableModule , DeserializeError > {
You can’t perform that action at this time.
0 commit comments