Skip to content

Commit 7cbdc0d

Browse files
author
rmqtt
committed
Remove comment code
1 parent 01aae07 commit 7cbdc0d

File tree

1 file changed

+1
-63
lines changed

1 file changed

+1
-63
lines changed

src/connector.rs

Lines changed: 1 addition & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -32,37 +32,8 @@ impl<T> Connector<T> {
3232
bind_addr,
3333
}
3434
}
35-
36-
// /// Set memory pool.
37-
// ///
38-
// /// Use specified memory pool for memory allocations. By default P0
39-
// /// memory pool is used.
40-
// pub fn memory_pool(mut self, id: PoolId) -> Self {
41-
// self.pool = id.pool_ref();
42-
// self
43-
// }
4435
}
4536

46-
//impl<T: Address> Connector<T> {
47-
// /// Resolve and connect to remote host
48-
// pub fn connect<U>(&self, message: U) -> impl Future<Output = Result<Io, ConnectError>>
49-
// where
50-
// Connect<T>: From<U>,
51-
// {
52-
// ConnectServiceResponse {
53-
// state: ConnectState::Resolve(self.resolver.call(message.into())),
54-
// bind_addr: self.bind_addr,
55-
// pool: self.pool,
56-
// }
57-
// }
58-
//}
59-
60-
//impl<T> Default for Connector<T> {
61-
// fn default() -> Self {
62-
// Connector::new(None)
63-
// }
64-
//}
65-
6637
impl<T> Clone for Connector<T> {
6738
fn clone(&self) -> Self {
6839
Connector {
@@ -73,31 +44,6 @@ impl<T> Clone for Connector<T> {
7344
}
7445
}
7546

76-
//impl<T: Address> From<Connector<T>> for IoBoxed {
77-
// fn from(value: Connector<T>) -> Self {
78-
// IoBoxed::from(Io::new(value))
79-
// }
80-
//}
81-
//
82-
//impl<T: Address> IoStream for Connector<T> {
83-
// fn start(self, _read: ReadContext, _write: WriteContext) -> Option<Box<dyn Handle>> {
84-
// let io = Rc::new(RefCell::new(self));
85-
// Some(Box::new(IoBoxedHandleWrapper(io)))
86-
// }
87-
//}
88-
89-
//impl<T: Address + Debug, C> ServiceFactory<Connect<T>, C> for Connector<T> {
90-
// type Response = Io;
91-
// type Error = ConnectError;
92-
// type Service = Connector<T>;
93-
// type InitError = ();
94-
// type Future = Ready<Self::Service, Self::InitError>;
95-
//
96-
// #[inline]
97-
// fn new_service(&self, _: C) -> Self::Future {
98-
// Ready::Ok(self.clone())
99-
// }
100-
//}
10147

10248
impl<T: Address> Service<Connect<T>> for Connector<T> {
10349
type Response = Io;
@@ -461,7 +407,7 @@ impl Future for WriteTask {
461407
type Output = ();
462408

463409
fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
464-
let mut this = self.as_mut().get_mut();
410+
let this = self.as_mut().get_mut();
465411

466412
match this.st {
467413
IoWriteState::Processing(ref mut delay) => {
@@ -725,12 +671,4 @@ where
725671
}
726672
}
727673

728-
//struct IoBoxedHandleWrapper<T>(Rc<RefCell<Connector<T>>>);
729-
//
730-
//impl<T> Handle for IoBoxedHandleWrapper<T> {
731-
// fn query(&self, _id: any::TypeId) -> Option<Box<dyn any::Any>> {
732-
// None
733-
// }
734-
//}
735-
736674
pub type ReqAddress = String;

0 commit comments

Comments
 (0)