mirror of
https://github.com/servo/servo.git
synced 2025-08-09 07:25:35 +01:00
rustdoc: Add some basic Safety sections to unsafe functions (#31639)
This commit is contained in:
parent
0860deba05
commit
38db1a5ce9
3 changed files with 22 additions and 0 deletions
|
@ -47,6 +47,11 @@ pub struct ShapedGlyphEntry {
|
|||
}
|
||||
|
||||
impl ShapedGlyphData {
|
||||
/// Create a new [`SharedGlyphData`] from the given HarfBuzz buffer.
|
||||
///
|
||||
/// # Safety
|
||||
///
|
||||
/// Passing an invalid buffer pointer to this function results in undefined behavior.
|
||||
pub unsafe fn new(buffer: *mut hb_buffer_t) -> ShapedGlyphData {
|
||||
let mut glyph_count = 0;
|
||||
let glyph_infos = hb_buffer_get_glyph_infos(buffer, &mut glyph_count);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue