Commit e39c13b
authored
tower-abci: v038's
this adds a `#[cfg(target_family = "unix")]` gate to the `listen_unix` method
of `Server`. this fixes a broken build on non-unix systems.
---
example:
```
; git show --oneline --quiet HEAD
4b73065 (HEAD -> main, origin/main, origin/HEAD) tower-abci: use `tendermint@0.35` (#46)
; cargo build --quiet --target x86_64-pc-windows-msvc && echo "build passed"
error[E0432]: unresolved import `tokio::net::UnixListener`
--> src/v038/server.rs:9:39
|
9 | net::{TcpListener, ToSocketAddrs, UnixListener},
| ^^^^^^^^^^^^
| |
| no `UnixListener` in `net`
| help: a similar name exists in the module: `TcpListener`
|
note: found an item that was configured out
--> .cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.1/src/net/mod.rs:50:29
|
50 | pub use unix::listener::UnixListener;
| ^^^^^^^^^^^^
For more information about this error, try `rustc --explain E0432`.
error: could not compile `tower-abci` (lib) due to 1 previous error
; git switch unix-guard-v038
branch 'unix-guard-v038' set up to track 'heliaxdev/unix-guard-v038'.
Switched to a new branch 'unix-guard-v038'
; git show --oneline --quiet HEAD
52382f4 (HEAD -> unix-guard-v038, heliaxdev/unix-guard-v038) add feature guard to unix-only listener in v038
; cargo build --quiet --target x86_64-pc-windows-msvc && echo "build passed"
build passed
```Server::listen_unix() is only used in unix builds (#47)1 parent 4b73065 commit e39c13b
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | | - | |
| 8 | + | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
126 | 125 | | |
127 | 126 | | |
128 | 127 | | |
129 | | - | |
130 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
0 commit comments