File tree 3 files changed +9
-35
lines changed
3 files changed +9
-35
lines changed Original file line number Diff line number Diff line change 24
24
with :
25
25
command : fmt
26
26
args : --all -- --check
27
-
28
- - name : Install dependencies
29
- run : |
30
- sudo apt-get update
31
- sudo apt-get install \
32
- libgl1-mesa-dev \
33
- libxcb-composite0-dev \
34
- libxcb-damage0-dev \
35
- libxcb-dpms0-dev \
36
- libxcb-dri2-0-dev \
37
- libxcb-dri3-dev \
38
- libxcb-glx0-dev \
39
- libxcb-present-dev \
40
- libxcb-randr0-dev \
41
- libxcb-record0-dev \
42
- libxcb-render0-dev \
43
- libxcb-res0-dev \
44
- libxcb-screensaver0-dev \
45
- libxcb-shape0-dev \
46
- libxcb-shm0-dev \
47
- libxcb-sync-dev \
48
- libxcb-xf86dri0-dev \
49
- libxcb-xfixes0-dev \
50
- libxcb-xinerama0-dev \
51
- libxcb-xkb-dev \
52
- libxcb-xtest0-dev \
53
- libxcb-xv0-dev \
54
- libxcb-xvmc0-dev \
55
- libx11-xcb-dev
56
-
57
- - name : Run cargo clippy
58
- uses : actions-rs/cargo@v1
59
- with :
60
- command : clippy
61
- args : --all-features -- -D warnings
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ quick-xml = "0.22.0"
22
22
[dependencies ]
23
23
libc = " 0.2.102"
24
24
bitflags = " 1.3.2"
25
+ as-raw-xcb-connection = { version = " 1.0" , optional = true }
25
26
26
27
[dependencies .x11 ]
27
28
version = " 2.19.0"
Original file line number Diff line number Diff line change @@ -1636,6 +1636,14 @@ impl AsRawFd for Connection {
1636
1636
}
1637
1637
}
1638
1638
1639
+ // SAFETY: We provide a valid xcb_connection_t that is valid for as long as required by the trait.
1640
+ #[ cfg( feature = "as-raw-xcb-connection" ) ]
1641
+ unsafe impl as_raw_xcb_connection:: AsRawXcbConnection for Connection {
1642
+ fn as_raw_xcb_connection ( & self ) -> * mut as_raw_xcb_connection:: xcb_connection_t {
1643
+ self . get_raw_conn ( ) . cast ( )
1644
+ }
1645
+ }
1646
+
1639
1647
impl Drop for Connection {
1640
1648
fn drop ( & mut self ) {
1641
1649
#[ cfg( feature = "debug_atom_names" ) ]
You can’t perform that action at this time.
0 commit comments