threadshare/socket: Fix build error on Windows

error[E0412]: cannot find type `Error` in this scope
   --> generic\threadshare\src\socket.rs:237:56
    |
237 |     pub fn set_tos(&self, qos_dscp: i32) -> Result<(), Error> {
    |                                                        ^^^^^ not found in this scope
This commit is contained in:
Seungha Yang 2020-10-01 01:33:34 +09:00
parent 643544876b
commit 5cba2b002b

View file

@ -217,7 +217,7 @@ impl GioSocketWrapper {
}
#[cfg(unix)]
pub fn set_tos(&self, qos_dscp: i32) -> Result<(), glib::error::Error> {
pub fn set_tos(&self, qos_dscp: i32) -> Result<(), glib::Error> {
use libc::{IPPROTO_IP, IPPROTO_IPV6, IPV6_TCLASS, IP_TOS};
let tos = (qos_dscp & 0x3f) << 2;
@ -234,7 +234,7 @@ impl GioSocketWrapper {
}
#[cfg(not(unix))]
pub fn set_tos(&self, qos_dscp: i32) -> Result<(), Error> {
pub fn set_tos(&self, qos_dscp: i32) -> Result<(), glib::Error> {
Ok(())
}