mirror of
https://github.com/OMGeeky/tarpc.git
synced 2026-01-06 19:45:25 +01:00
&'static str -> &str
'static lifetime in const is default
This commit is contained in:
@@ -90,10 +90,10 @@ enum Reactor {
|
||||
|
||||
impl fmt::Debug for Reactor {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
|
||||
const HANDLE: &'static &'static str = &"Reactor::Handle";
|
||||
const HANDLE_INNER: &'static &'static str = &"Handle { .. }";
|
||||
const REMOTE: &'static &'static str = &"Reactor::Remote";
|
||||
const REMOTE_INNER: &'static &'static str = &"Remote { .. }";
|
||||
const HANDLE: &'static &str = &"Reactor::Handle";
|
||||
const HANDLE_INNER: &'static &str = &"Handle { .. }";
|
||||
const REMOTE: &'static &str = &"Reactor::Remote";
|
||||
const REMOTE_INNER: &'static &str = &"Remote { .. }";
|
||||
|
||||
match *self {
|
||||
Reactor::Handle(_) => f.debug_tuple(HANDLE).field(HANDLE_INNER).finish(),
|
||||
|
||||
@@ -127,7 +127,7 @@ impl fmt::Debug for Acceptor {
|
||||
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
|
||||
use self::Acceptor::*;
|
||||
#[cfg(feature = "tls")]
|
||||
const TLS: &'static &'static str = &"TlsAcceptor { .. }";
|
||||
const TLS: &'static &str = &"TlsAcceptor { .. }";
|
||||
|
||||
match *self {
|
||||
Tcp => fmt.debug_tuple("Acceptor::Tcp").finish(),
|
||||
@@ -223,9 +223,9 @@ impl Options {
|
||||
impl fmt::Debug for Options {
|
||||
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
|
||||
#[cfg(feature = "tls")]
|
||||
const SOME: &'static &'static str = &"Some(_)";
|
||||
const SOME: &'static &str = &"Some(_)";
|
||||
#[cfg(feature = "tls")]
|
||||
const NONE: &'static &'static str = &"None";
|
||||
const NONE: &'static &str = &"None";
|
||||
|
||||
let mut debug_struct = fmt.debug_struct("Options");
|
||||
#[cfg(feature = "tls")]
|
||||
@@ -352,7 +352,7 @@ where
|
||||
St: fmt::Debug,
|
||||
{
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
|
||||
const HANDLE: &'static &'static str = &"Handle { .. }";
|
||||
const HANDLE: &'static &str = &"Handle { .. }";
|
||||
f.debug_struct("BindStream")
|
||||
.field("handle", HANDLE)
|
||||
.field("new_service", &self.new_service)
|
||||
|
||||
@@ -30,7 +30,7 @@ impl<Req, Resp, E> Clone for Client<Req, Resp, E> {
|
||||
|
||||
impl<Req, Resp, E> fmt::Debug for Client<Req, Resp, E> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
|
||||
const PROXY: &'static &'static str = &"ClientProxy { .. }";
|
||||
const PROXY: &'static &str = &"ClientProxy { .. }";
|
||||
f.debug_struct("Client").field("proxy", PROXY).finish()
|
||||
}
|
||||
}
|
||||
@@ -93,9 +93,9 @@ impl Options {
|
||||
impl fmt::Debug for Options {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
|
||||
#[cfg(feature = "tls")]
|
||||
const SOME: &'static &'static str = &"Some(_)";
|
||||
const SOME: &'static &str = &"Some(_)";
|
||||
#[cfg(feature = "tls")]
|
||||
const NONE: &'static &'static str = &"None";
|
||||
const NONE: &'static &str = &"None";
|
||||
let mut f = f.debug_struct("Options");
|
||||
#[cfg(feature = "tls")] f.field("tls_ctx", if self.tls_ctx.is_some() { SOME } else { NONE });
|
||||
f.finish()
|
||||
|
||||
@@ -89,8 +89,8 @@ impl Handle {
|
||||
|
||||
impl fmt::Debug for Handle {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
|
||||
const CORE: &'static &'static str = &"Core { .. }";
|
||||
const SERVER: &'static &'static str = &"Box<Future<Item = (), Error = ()>>";
|
||||
const CORE: &'static &str = &"Core { .. }";
|
||||
const SERVER: &'static &str = &"Box<Future<Item = (), Error = ()>>";
|
||||
|
||||
f.debug_struct("Handle")
|
||||
.field("reactor", CORE)
|
||||
|
||||
Reference in New Issue
Block a user