diff --git a/src/intern.rs b/src/intern.rs index 9d7aad1c..9d424721 100644 --- a/src/intern.rs +++ b/src/intern.rs @@ -2,45 +2,38 @@ use std::fmt; use std::ascii::AsciiExt; use string_intern::{Symbol, Validator}; +mod private { + // These structs are implementation details. + pub struct UpstreamValidator; + pub struct HandlerValidator; + pub struct DiskPoolValidator; + pub struct SessionPoolValidator; + pub struct SessionIdValidator; + pub struct TopicValidator; + pub struct LatticeNamespaceValidator; + pub struct LatticeKeyValidator; + pub struct LatticeVarValidator; + pub struct LdapValidator; + pub struct AuthorizerValidator; + pub struct NetworkValidator; +} +use self::private::*; -struct UpstreamValidator; pub type Upstream = Symbol; - -struct HandlerValidator; pub type HandlerName = Symbol; - -struct DiskPoolValidator; pub type DiskPoolName = Symbol; - -struct SessionPoolValidator; pub type SessionPoolName = Symbol; - -struct SessionIdValidator; pub type SessionId = Symbol; - -struct TopicValidator; pub type Topic = Symbol; - -struct LatticeNamespaceValidator; /// Name of the lattice namespace (set of keys) pub type Lattice = Symbol; - -struct LatticeKeyValidator; /// Key in lattice namespace (set of CRDT variables), /// logically should validate same as Topic pub type LatticeKey = Symbol; - -struct LatticeVarValidator; /// CRDT variable name in lattice pub type LatticeVar = Symbol; - -struct LdapValidator; pub type LdapUpstream = Symbol; - -struct AuthorizerValidator; pub type Authorizer = Symbol; - -struct NetworkValidator; pub type Network = Symbol; quick_error! { diff --git a/src/main-dev.rs b/src/main-dev.rs index f580e5ce..829a8161 100644 --- a/src/main-dev.rs +++ b/src/main-dev.rs @@ -1,8 +1,3 @@ -// I don't see **any** reason for this waring to enabled. We only build binary -// and most of these warnings do not apply to real visibility of types inside -// the crate -#![allow(private_in_public)] - #[macro_use] extern crate lazy_static; #[macro_use] extern crate log; #[macro_use] extern crate matches; diff --git a/src/main.rs b/src/main.rs index 7a54f491..01c87f76 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,8 +1,3 @@ -// I don't see **any** reason for this warning to be enabled. We only build binary -// and most of these warnings do not apply to real visibility of types inside -// the crate -#![allow(private_in_public)] - #[macro_use] extern crate lazy_static; #[macro_use] extern crate log; #[macro_use] extern crate matches;