You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to make my credentials configurable. Like this:
let session = if let Some((user, pass)) = pass {
let auth = StaticPasswordAuthenticator::new(user, pass);
let node = NodeTcpConfigBuilder::new("127.0.0.1:9042", auth).build();
let cluster_config = ClusterTcpConfig(vec![node]);
session::new(&cluster_config, RoundRobin::new()).expect("session should be created")
} else {
let auth = NoneAuthenticator {};
let node = NodeTcpConfigBuilder::new("127.0.0.1:9042", auth).build();
let cluster_config = ClusterTcpConfig(vec![node]);
session::new(&cluster_config, RoundRobin::new()).expect("session should be created")
};
That obviously fails as it will generate incompatible types. What would be the proper way?
The text was updated successfully, but these errors were encountered:
I was trying to make my credentials configurable. Like this:
That obviously fails as it will generate incompatible types. What would be the proper way?
The text was updated successfully, but these errors were encountered: