[librsvg: 13/14] cargo fmt
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 13/14] cargo fmt
- Date: Tue, 23 Mar 2021 19:57:56 +0000 (UTC)
commit e07c8a5fa75cff3e8158ae2289423e21d91d4781
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Mar 23 13:54:27 2021 -0600
cargo fmt
src/c_api/handle.rs | 17 +++++++++++------
src/drawing_ctx.rs | 7 ++-----
2 files changed, 13 insertions(+), 11 deletions(-)
---
diff --git a/src/c_api/handle.rs b/src/c_api/handle.rs
index 070d0a96..832999f7 100644
--- a/src/c_api/handle.rs
+++ b/src/c_api/handle.rs
@@ -96,7 +96,10 @@ pub enum HandleFlags {
#[gflags(name = "RSVG_HANDLE_FLAG_UNLIMITED", nick = "flag-unlimited")]
UNLIMITED = 1 << 0,
- #[gflags(name = "RSVG_HANDLE_FLAG_KEEP_IMAGE_DATA", nick = "flag-keep-image-data")]
+ #[gflags(
+ name = "RSVG_HANDLE_FLAG_KEEP_IMAGE_DATA",
+ nick = "flag-keep-image-data"
+ )]
KEEP_IMAGE_DATA = 1 << 1,
}
@@ -1506,10 +1509,12 @@ pub unsafe extern "C" fn rsvg_handle_new() -> *const RsvgHandle {
#[no_mangle]
pub unsafe extern "C" fn rsvg_handle_new_with_flags(flags: RsvgHandleFlags) -> *const RsvgHandle {
- let obj: *mut gobject_sys::GObject =
- glib::Object::new(CHandle::get_type(), &[("flags", &HandleFlags::from_bits_truncate(flags))])
- .unwrap()
- .to_glib_full();
+ let obj: *mut gobject_sys::GObject = glib::Object::new(
+ CHandle::get_type(),
+ &[("flags", &HandleFlags::from_bits_truncate(flags))],
+ )
+ .unwrap()
+ .to_glib_full();
obj as *mut _
}
@@ -2080,7 +2085,7 @@ pub(crate) fn set_gerror(err: *mut *mut glib_sys::GError, code: u32, msg: &str)
#[repr(u32)]
#[genum(type_name = "RsvgError")]
enum Error {
- #[genum(name = "RSVG_ERROR_FAILED", nick="failed")]
+ #[genum(name = "RSVG_ERROR_FAILED", nick = "failed")]
// Keep in sync with rsvg.h:RsvgError
Failed = 0,
}
diff --git a/src/drawing_ctx.rs b/src/drawing_ctx.rs
index 75d989c9..5b4e3934 100644
--- a/src/drawing_ctx.rs
+++ b/src/drawing_ctx.rs
@@ -978,10 +978,7 @@ impl DrawingCtx {
Ok(child_surface)
}
- fn set_gradient(
- self: &mut DrawingCtx,
- gradient: &UserSpaceGradient,
- ) {
+ fn set_gradient(self: &mut DrawingCtx, gradient: &UserSpaceGradient) {
let g = match gradient.variant {
GradientVariant::Linear { x1, y1, x2, y2 } => {
cairo::Gradient::clone(&cairo::LinearGradient::new(x1, y1, x2, y2))
@@ -1128,7 +1125,7 @@ impl DrawingCtx {
UserSpacePaintSource::SolidColor(c) => {
self.set_color(c);
Ok(true)
- },
+ }
UserSpacePaintSource::None => Ok(false),
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]