File tree 2 files changed +36
-15
lines changed
2 files changed +36
-15
lines changed Original file line number Diff line number Diff line change
1
+ restore_registry : &RESTORE_REGISTRY
2
+ restore_cache :
3
+ key : registry
4
+
5
+ save_registry : &SAVE_REGISTRY
6
+ save_cache :
7
+ key : registry-{{ .BuildNum }}
8
+ paths :
9
+ - /usr/local/cargo/registry/index
10
+
11
+ deps_key : &DEPS_KEY
12
+ key : deps-1.19.0-{{ checksum "Cargo.lock" }}
13
+
14
+ restore_deps : &RESTORE_DEPS
15
+ restore_cache :
16
+ << : *DEPS_KEY
17
+
18
+ save_deps : &SAVE_DEPS
19
+ save_cache :
20
+ << : *DEPS_KEY
21
+ paths :
22
+ - target
23
+ - /usr/local/cargo/registry/cache
24
+
1
25
version : 2
2
26
jobs :
3
27
build :
4
28
working_directory : ~/build
5
29
docker :
6
- - image : jimmycuadra/ rust:1.18 .0
30
+ - image : rust:1.19 .0
7
31
- image : sfackler/rust-postgres-test:2
8
32
steps :
9
33
- checkout
10
34
- run : apt-get update
11
35
- run : DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends jq
12
- - restore_cache :
13
- key : registry
36
+ - << : *RESTORE_REGISTRY
14
37
- run : cargo generate-lockfile
15
- - save_cache :
16
- key : registry-{{ epoch }}
17
- paths :
18
- - ~/.cargo/registry/index
19
- - restore_cache :
20
- key : dependencies-1.18-{{ checksum "Cargo.lock" }}
38
+ - << : *SAVE_REGISTRY
39
+ - << : *RESTORE_DEPS
21
40
- run : cargo test --all
22
41
- run : cargo test --manifest-path=postgres/Cargo.toml --features "$(cargo read-manifest --manifest-path=postgres/Cargo.toml | jq -r '.features|keys|map(select(. != "with-security-framework" and . != "with-schannel"))|join(" ")')"
23
42
- run : cargo test --manifest-path=tokio-postgres/Cargo.toml --all-features
24
- - save_cache :
25
- key : dependencies-1.18-{{ checksum "Cargo.lock" }}
26
- paths :
27
- - target
28
- - ~/.cargo/registry/cache
43
+ - << : *SAVE_DEPS
Original file line number Diff line number Diff line change @@ -118,7 +118,13 @@ impl MessageStream {
118
118
}
119
119
120
120
fn set_read_timeout ( & self , timeout : Option < Duration > ) -> io:: Result < ( ) > {
121
- self . stream . get_ref ( ) . get_ref ( ) . 0 . set_read_timeout ( timeout)
121
+ // self.stream.get_ref().get_ref().0.set_read_timeout(timeout)
122
+ let s = unsafe {
123
+ :: std:: net:: TcpStream :: from_raw_fd ( self . stream . get_ref ( ) . get_ref ( ) . 0 . as_raw_fd ( ) )
124
+ } ;
125
+ let r = s. set_read_timeout ( timeout) ;
126
+ :: std:: mem:: forget ( s) ;
127
+ r
122
128
}
123
129
124
130
fn set_nonblocking ( & self , nonblock : bool ) -> io:: Result < ( ) > {
You can’t perform that action at this time.
0 commit comments