Skip to content

Commit

Permalink
Merge pull request #13 from petrochenkov/master
Browse files Browse the repository at this point in the history
Fix build on nightly rustc
  • Loading branch information
tailhook authored May 27, 2017
2 parents 8af2224 + da80652 commit 8a8daf5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 33 deletions.
39 changes: 16 additions & 23 deletions src/intern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<UpstreamValidator>;

struct HandlerValidator;
pub type HandlerName = Symbol<HandlerValidator>;

struct DiskPoolValidator;
pub type DiskPoolName = Symbol<DiskPoolValidator>;

struct SessionPoolValidator;
pub type SessionPoolName = Symbol<SessionPoolValidator>;

struct SessionIdValidator;
pub type SessionId = Symbol<SessionIdValidator>;

struct TopicValidator;
pub type Topic = Symbol<TopicValidator>;

struct LatticeNamespaceValidator;
/// Name of the lattice namespace (set of keys)
pub type Lattice = Symbol<LatticeNamespaceValidator>;

struct LatticeKeyValidator;
/// Key in lattice namespace (set of CRDT variables),
/// logically should validate same as Topic
pub type LatticeKey = Symbol<LatticeKeyValidator>;

struct LatticeVarValidator;
/// CRDT variable name in lattice
pub type LatticeVar = Symbol<LatticeVarValidator>;

struct LdapValidator;
pub type LdapUpstream = Symbol<LdapValidator>;

struct AuthorizerValidator;
pub type Authorizer = Symbol<AuthorizerValidator>;

struct NetworkValidator;
pub type Network = Symbol<NetworkValidator>;

quick_error! {
Expand Down
5 changes: 0 additions & 5 deletions src/main-dev.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
5 changes: 0 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit 8a8daf5

Please sign in to comment.