[librsvg/rustification] path_builder.rs: Compress declarations a bit
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/rustification] path_builder.rs: Compress declarations a bit
- Date: Wed, 2 Nov 2016 01:32:03 +0000 (UTC)
commit 3c8c6a41506ebbc5913cbf1cf60acebe370fedeb
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Nov 1 17:08:44 2016 -0600
path_builder.rs: Compress declarations a bit
rust/src/path_builder.rs | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/rust/src/path_builder.rs b/rust/src/path_builder.rs
index 7cebce5..d18374b 100644
--- a/rust/src/path_builder.rs
+++ b/rust/src/path_builder.rs
@@ -58,8 +58,7 @@ pub extern fn rsvg_path_builder_move_to (raw_builder: *mut RsvgPathBuilder,
y: f64) {
assert! (!raw_builder.is_null ());
- let builder: &mut RsvgPathBuilder;
- unsafe { builder = &mut (*raw_builder); }
+ let builder: &mut RsvgPathBuilder = unsafe { &mut (*raw_builder) };
builder.move_to (x, y);
}
@@ -70,8 +69,7 @@ pub extern fn rsvg_path_builder_line_to (raw_builder: *mut RsvgPathBuilder,
y: f64) {
assert! (!raw_builder.is_null ());
- let builder: &mut RsvgPathBuilder;
- unsafe { builder = &mut (*raw_builder); }
+ let builder: &mut RsvgPathBuilder = unsafe { &mut (*raw_builder) };
builder.line_to (x, y);
}
@@ -83,8 +81,7 @@ pub extern fn rsvg_path_builder_curve_to (raw_builder: *mut RsvgPathBuilder,
x4: f64, y4: f64) {
assert! (!raw_builder.is_null ());
- let builder: &mut RsvgPathBuilder;
- unsafe { builder = &mut (*raw_builder); }
+ let builder: &mut RsvgPathBuilder = unsafe { &mut (*raw_builder) };
builder.curve_to (x2, y2, x3, y3, x4, y4);
}
@@ -93,8 +90,7 @@ pub extern fn rsvg_path_builder_curve_to (raw_builder: *mut RsvgPathBuilder,
pub extern fn rsvg_path_builder_close_path (raw_builder: *mut RsvgPathBuilder) {
assert! (!raw_builder.is_null ());
- let builder: &mut RsvgPathBuilder;
- unsafe { builder = &mut (*raw_builder); }
+ let builder: &mut RsvgPathBuilder = unsafe { &mut (*raw_builder) };
builder.close_path ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]