Skip to content

Commit

Permalink
Merge pull request gtk-rs#1 from sfanxiang/fix-gir
Browse files Browse the repository at this point in the history
Fix for Value returning a Result
  • Loading branch information
sfanxiang authored Aug 14, 2019
2 parents c9d36c4 + 862752d commit 3695eae
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 18 deletions.
4 changes: 3 additions & 1 deletion src/auto/app_launch_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ impl AppLaunchContext {
b"display\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
value.get()
value
.get()
.expect("Return Value for property `display` getter")
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion src/auto/clipboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,10 @@ impl Clipboard {
b"local\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
value.get().unwrap()
value
.get()
.expect("Return Value for property `local` getter")
.unwrap()
}
}

Expand Down
8 changes: 6 additions & 2 deletions src/auto/content_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,9 @@ impl<O: IsA<ContentProvider>> ContentProviderExt for O {
b"formats\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
value.get()
value
.get()
.expect("Return Value for property `formats` getter")
}
}

Expand All @@ -235,7 +237,9 @@ impl<O: IsA<ContentProvider>> ContentProviderExt for O {
b"storable-formats\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
value.get()
value
.get()
.expect("Return Value for property `storable-formats` getter")
}
}

Expand Down
24 changes: 19 additions & 5 deletions src/auto/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,10 @@ impl Device {
b"input-mode\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
value.get().unwrap()
value
.get()
.expect("Return Value for property `input-mode` getter")
.unwrap()
}
}

Expand All @@ -235,7 +238,10 @@ impl Device {
b"input-source\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
value.get().unwrap()
value
.get()
.expect("Return Value for property `input-source` getter")
.unwrap()
}
}

Expand All @@ -247,7 +253,10 @@ impl Device {
b"num-touches\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
value.get().unwrap()
value
.get()
.expect("Return Value for property `num-touches` getter")
.unwrap()
}
}

Expand All @@ -269,7 +278,9 @@ impl Device {
b"tool\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
value.get()
value
.get()
.expect("Return Value for property `tool` getter")
}
}

Expand All @@ -281,7 +292,10 @@ impl Device {
b"type\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
value.get().unwrap()
value
.get()
.expect("Return Value for property `type` getter")
.unwrap()
}
}

Expand Down
5 changes: 4 additions & 1 deletion src/auto/device_tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ impl DeviceTool {
b"axes\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
value.get().unwrap()
value
.get()
.expect("Return Value for property `axes` getter")
.unwrap()
}
}
}
Expand Down
10 changes: 8 additions & 2 deletions src/auto/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,10 @@ impl Display {
b"composited\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
value.get().unwrap()
value
.get()
.expect("Return Value for property `composited` getter")
.unwrap()
}
}

Expand All @@ -246,7 +249,10 @@ impl Display {
b"rgba\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
value.get().unwrap()
value
.get()
.expect("Return Value for property `rgba` getter")
.unwrap()
}
}

Expand Down
8 changes: 6 additions & 2 deletions src/auto/drag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ impl Drag {
b"content\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
value.get()
value
.get()
.expect("Return Value for property `content` getter")
}
}

Expand All @@ -108,7 +110,9 @@ impl Drag {
b"surface\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
value.get()
value
.get()
.expect("Return Value for property `surface` getter")
}
}

Expand Down
5 changes: 4 additions & 1 deletion src/auto/monitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ impl Monitor {
b"valid\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
value.get().unwrap()
value
.get()
.expect("Return Value for property `valid` getter")
.unwrap()
}
}

Expand Down
5 changes: 4 additions & 1 deletion src/auto/surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,10 @@ impl<O: IsA<Surface>> SurfaceExt for O {
b"mapped\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
value.get().unwrap()
value
.get()
.expect("Return Value for property `mapped` getter")
.unwrap()
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 22b8475)
Generated by gir (https://github.com/gtk-rs/gir @ 11e59a0)
from gir-files (https://github.com/gtk-rs/gir-files @ cae49a8)

0 comments on commit 3695eae

Please sign in to comment.