Skip to content

Commit e7a5cd6

Browse files
committed
fix the test compile issue
1 parent aff61fb commit e7a5cd6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/drawing/backend_impl/cairo.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ mod test {
347347

348348
fn draw_mesh_with_custom_ticks(tick_size: i32, test_name: &str) {
349349
let buffer: Vec<u8> = vec![];
350-
let surface = cairo::PsSurface::for_stream(500.0, 500.0, buffer);
350+
let surface = cairo::PsSurface::for_stream(500.0, 500.0, buffer).unwrap();
351351
let cr = CairoContext::new(&surface);
352352
let root = CairoBackend::new(&cr, (500, 500))
353353
.unwrap()
@@ -387,7 +387,7 @@ mod test {
387387
fn test_text_draw() {
388388
let buffer: Vec<u8> = vec![];
389389
let (width, height) = (1500, 800);
390-
let surface = cairo::PsSurface::for_stream(width.into(), height.into(), buffer);
390+
let surface = cairo::PsSurface::for_stream(width.into(), height.into(), buffer).unwrap();
391391
let cr = CairoContext::new(&surface);
392392
let root = CairoBackend::new(&cr, (width, height))
393393
.unwrap()
@@ -453,7 +453,7 @@ mod test {
453453
fn test_text_clipping() {
454454
let buffer: Vec<u8> = vec![];
455455
let (width, height) = (500_i32, 500_i32);
456-
let surface = cairo::PsSurface::for_stream(width.into(), height.into(), buffer);
456+
let surface = cairo::PsSurface::for_stream(width.into(), height.into(), buffer).unwrap();
457457
let cr = CairoContext::new(&surface);
458458
let root = CairoBackend::new(&cr, (width as u32, height as u32))
459459
.unwrap()
@@ -486,7 +486,7 @@ mod test {
486486
fn test_series_labels() {
487487
let buffer: Vec<u8> = vec![];
488488
let (width, height) = (500, 500);
489-
let surface = cairo::PsSurface::for_stream(width.into(), height.into(), buffer);
489+
let surface = cairo::PsSurface::for_stream(width.into(), height.into(), buffer).unwrap();
490490
let cr = CairoContext::new(&surface);
491491
let root = CairoBackend::new(&cr, (width, height))
492492
.unwrap()
@@ -548,7 +548,7 @@ mod test {
548548
fn test_draw_pixel_alphas() {
549549
let buffer: Vec<u8> = vec![];
550550
let (width, height) = (100_i32, 100_i32);
551-
let surface = cairo::PsSurface::for_stream(width.into(), height.into(), buffer);
551+
let surface = cairo::PsSurface::for_stream(width.into(), height.into(), buffer).unwrap();
552552
let cr = CairoContext::new(&surface);
553553
let root = CairoBackend::new(&cr, (width as u32, height as u32))
554554
.unwrap()

0 commit comments

Comments
 (0)