mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Simplify FontTableMethods::with_buffer
This commit is contained in:
parent
2d5dc8fa6d
commit
1eab6fbb2e
4 changed files with 9 additions and 11 deletions
|
@ -52,8 +52,8 @@ impl FontTable {
|
|||
}
|
||||
|
||||
impl FontTableMethods for FontTable {
|
||||
fn with_buffer<F>(&self, blk: F) where F: FnOnce(*const u8, usize) {
|
||||
blk(self.data.bytes().as_ptr(), self.data.len() as usize);
|
||||
fn buffer(&self) -> &[u8] {
|
||||
self.data.bytes()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue