[librsvg: 40/53] Formatting




commit 73fcafb40e090dd792e2b26ddf21c229003e4dfd
Author: Sven Neumann <sven svenfoo org>
Date:   Thu Oct 22 16:24:20 2020 +0200

    Formatting

 tests/src/reference.rs |  8 +++-----
 tests/src/utils.rs     | 11 +++++++----
 2 files changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/tests/src/reference.rs b/tests/src/reference.rs
index 01e2474f..228ff8eb 100644
--- a/tests/src/reference.rs
+++ b/tests/src/reference.rs
@@ -257,11 +257,9 @@ mod duplicated_from_librsvg_crate {
         let mut reference_file = BufReader::new(file);
 
         let png = cairo::ImageSurface::create_from_png(&mut reference_file).map_err(|_| ())?;
-        let argb = cairo::ImageSurface::create(
-            cairo::Format::ARgb32,
-            png.get_width(),
-            png.get_height(),
-        ).map_err(|_| ())?;
+        let argb =
+            cairo::ImageSurface::create(cairo::Format::ARgb32, png.get_width(), png.get_height())
+                .map_err(|_| ())?;
 
         {
             // convert to ARGB; the PNG may come as Rgb24
diff --git a/tests/src/utils.rs b/tests/src/utils.rs
index 53ccc8a5..a6e72f5e 100644
--- a/tests/src/utils.rs
+++ b/tests/src/utils.rs
@@ -28,14 +28,14 @@ pub fn fixture_path(filename_from_test_resources: &str) -> PathBuf {
 
 #[cfg(have_pangoft2)]
 mod pango_ft2 {
+    use super::*;
     use fontconfig_sys::fontconfig;
     use glib::prelude::*;
     use pangocairo::FontMap;
-    use super::*;
 
     extern "C" {
         // pango_fc_font_map_set_config (PangoFcFontMap *fcfontmap,
-       //                               FcConfig       *fcconfig);
+        //                               FcConfig       *fcconfig);
         // This is not bound in gtk-rs, and PangoFcFontMap is not even exposed, so we'll bind it by hand.
         fn pango_fc_font_map_set_config(
             font_map: *mut libc::c_void,
@@ -59,14 +59,17 @@ mod pango_ft2 {
             let path_cstring = CString::new(path_str).unwrap();
 
             if fontconfig::FcConfigAppFontAddFile(config, path_cstring.as_ptr() as *const _) == 0 {
-                panic!("Could not load font file {:?} for tests; aborting", path_str);
+                panic!(
+                    "Could not load font file {:?} for tests; aborting",
+                    path_str
+                );
             }
         }
 
         let font_map = FontMap::new_for_font_type(cairo::FontType::FontTypeFt).unwrap();
         let raw_font_map: *mut pango_sys::PangoFontMap = font_map.to_glib_none().0;
 
-        pango_fc_font_map_set_config (raw_font_map as *mut _, config);
+        pango_fc_font_map_set_config(raw_font_map as *mut _, config);
         fontconfig::FcConfigDestroy(config);
 
         FontMap::set_default(Some(font_map.downcast::<pangocairo::FontMap>().unwrap()));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]