]> git.proxmox.com Git - pve-lxc-syscalld.git/commitdiff
use default reactor
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 30 Oct 2019 13:08:46 +0000 (14:08 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 30 Oct 2019 13:08:46 +0000 (14:08 +0100)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
src/reactor.rs

index 6798af274e075084f326cbf388adcb5a2b62c08e..6f64d45582af895471e45a1d8dc9ffd5bd006463 100644 (file)
@@ -153,7 +153,11 @@ pub struct PolledFd {
 }
 
 impl PolledFd {
-    pub fn new(fd: Fd, reactor: Arc<Reactor>) -> io::Result<Self> {
+    pub fn new(fd: Fd) -> io::Result<Self> {
+        Self::new_with_reactor(fd, crate::reactor::default())
+    }
+
+    pub fn new_with_reactor(fd: Fd, reactor: Arc<Reactor>) -> io::Result<Self> {
         let registration = reactor.register(fd.as_raw_fd())?;
         Ok(Self { fd, registration })
     }