We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6933a8c commit ae64f29Copy full SHA for ae64f29
1 file changed
crates/bridge_harfbuzz/src/font_funcs.rs
@@ -495,3 +495,24 @@ unsafe impl<T: Send> Send for ImmutFontFuncs<T> {}
495
// reference from other threads. The contained data isn't bound because it is tied to the font,
496
// which is not Send or Sync and as such will not use the data across threads.
497
unsafe impl<T: Sync> Sync for ImmutFontFuncs<T> {}
498
+
499
+#[cfg(test)]
500
+mod tests {
501
+ use super::*;
502
503
+ #[test]
504
+ fn test_clone_drop() {
505
+ let funcs = FontFuncs::<()>::default();
506
+ let f2 = funcs.clone();
507
508
+ assert_eq!(f2.0, funcs.0);
509
510
+ let f2 = f2.make_immutable();
511
+ let f3 = f2.clone();
512
513
+ assert_eq!(f2.0, f3.0);
514
515
+ drop(funcs);
516
+ drop(f2);
517
+ }
518
+}
0 commit comments