Skip to content
This repository was archived by the owner on Feb 13, 2021. It is now read-only.

Commit 3695eae

Browse files
authored
Merge pull request #1 from sfanxiang/fix-gir
Fix for Value returning a Result
2 parents c9d36c4 + 862752d commit 3695eae

11 files changed

+60
-18
lines changed

src/auto/app_launch_context.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ impl AppLaunchContext {
6060
b"display\0".as_ptr() as *const _,
6161
value.to_glib_none_mut().0,
6262
);
63-
value.get()
63+
value
64+
.get()
65+
.expect("Return Value for property `display` getter")
6466
}
6567
}
6668
}

src/auto/clipboard.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,10 @@ impl Clipboard {
331331
b"local\0".as_ptr() as *const _,
332332
value.to_glib_none_mut().0,
333333
);
334-
value.get().unwrap()
334+
value
335+
.get()
336+
.expect("Return Value for property `local` getter")
337+
.unwrap()
335338
}
336339
}
337340

src/auto/content_provider.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,9 @@ impl<O: IsA<ContentProvider>> ContentProviderExt for O {
223223
b"formats\0".as_ptr() as *const _,
224224
value.to_glib_none_mut().0,
225225
);
226-
value.get()
226+
value
227+
.get()
228+
.expect("Return Value for property `formats` getter")
227229
}
228230
}
229231

@@ -235,7 +237,9 @@ impl<O: IsA<ContentProvider>> ContentProviderExt for O {
235237
b"storable-formats\0".as_ptr() as *const _,
236238
value.to_glib_none_mut().0,
237239
);
238-
value.get()
240+
value
241+
.get()
242+
.expect("Return Value for property `storable-formats` getter")
239243
}
240244
}
241245

src/auto/device.rs

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,10 @@ impl Device {
213213
b"input-mode\0".as_ptr() as *const _,
214214
value.to_glib_none_mut().0,
215215
);
216-
value.get().unwrap()
216+
value
217+
.get()
218+
.expect("Return Value for property `input-mode` getter")
219+
.unwrap()
217220
}
218221
}
219222

@@ -235,7 +238,10 @@ impl Device {
235238
b"input-source\0".as_ptr() as *const _,
236239
value.to_glib_none_mut().0,
237240
);
238-
value.get().unwrap()
241+
value
242+
.get()
243+
.expect("Return Value for property `input-source` getter")
244+
.unwrap()
239245
}
240246
}
241247

@@ -247,7 +253,10 @@ impl Device {
247253
b"num-touches\0".as_ptr() as *const _,
248254
value.to_glib_none_mut().0,
249255
);
250-
value.get().unwrap()
256+
value
257+
.get()
258+
.expect("Return Value for property `num-touches` getter")
259+
.unwrap()
251260
}
252261
}
253262

@@ -269,7 +278,9 @@ impl Device {
269278
b"tool\0".as_ptr() as *const _,
270279
value.to_glib_none_mut().0,
271280
);
272-
value.get()
281+
value
282+
.get()
283+
.expect("Return Value for property `tool` getter")
273284
}
274285
}
275286

@@ -281,7 +292,10 @@ impl Device {
281292
b"type\0".as_ptr() as *const _,
282293
value.to_glib_none_mut().0,
283294
);
284-
value.get().unwrap()
295+
value
296+
.get()
297+
.expect("Return Value for property `type` getter")
298+
.unwrap()
285299
}
286300
}
287301

src/auto/device_tool.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ impl DeviceTool {
4545
b"axes\0".as_ptr() as *const _,
4646
value.to_glib_none_mut().0,
4747
);
48-
value.get().unwrap()
48+
value
49+
.get()
50+
.expect("Return Value for property `axes` getter")
51+
.unwrap()
4952
}
5053
}
5154
}

src/auto/display.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,10 @@ impl Display {
234234
b"composited\0".as_ptr() as *const _,
235235
value.to_glib_none_mut().0,
236236
);
237-
value.get().unwrap()
237+
value
238+
.get()
239+
.expect("Return Value for property `composited` getter")
240+
.unwrap()
238241
}
239242
}
240243

@@ -246,7 +249,10 @@ impl Display {
246249
b"rgba\0".as_ptr() as *const _,
247250
value.to_glib_none_mut().0,
248251
);
249-
value.get().unwrap()
252+
value
253+
.get()
254+
.expect("Return Value for property `rgba` getter")
255+
.unwrap()
250256
}
251257
}
252258

src/auto/drag.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ impl Drag {
8686
b"content\0".as_ptr() as *const _,
8787
value.to_glib_none_mut().0,
8888
);
89-
value.get()
89+
value
90+
.get()
91+
.expect("Return Value for property `content` getter")
9092
}
9193
}
9294

@@ -108,7 +110,9 @@ impl Drag {
108110
b"surface\0".as_ptr() as *const _,
109111
value.to_glib_none_mut().0,
110112
);
111-
value.get()
113+
value
114+
.get()
115+
.expect("Return Value for property `surface` getter")
112116
}
113117
}
114118

src/auto/monitor.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ impl Monitor {
9696
b"valid\0".as_ptr() as *const _,
9797
value.to_glib_none_mut().0,
9898
);
99-
value.get().unwrap()
99+
value
100+
.get()
101+
.expect("Return Value for property `valid` getter")
102+
.unwrap()
100103
}
101104
}
102105

src/auto/surface.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1216,7 +1216,10 @@ impl<O: IsA<Surface>> SurfaceExt for O {
12161216
b"mapped\0".as_ptr() as *const _,
12171217
value.to_glib_none_mut().0,
12181218
);
1219-
value.get().unwrap()
1219+
value
1220+
.get()
1221+
.expect("Return Value for property `mapped` getter")
1222+
.unwrap()
12201223
}
12211224
}
12221225

src/auto/versions.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Generated by gir (https://github.com/gtk-rs/gir @ 22b8475)
1+
Generated by gir (https://github.com/gtk-rs/gir @ 11e59a0)
22
from gir-files (https://github.com/gtk-rs/gir-files @ cae49a8)

0 commit comments

Comments
 (0)