Skip to content

Commit

Permalink
Minor maintenance work (#335)
Browse files Browse the repository at this point in the history
  • Loading branch information
aljazerzen authored Aug 7, 2024
1 parent 2333cc5 commit 7b4e9fe
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 30 deletions.
1 change: 0 additions & 1 deletion edgedb-tokio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ socket2 = "0.5"
command-fds = "0.3.0"

[dev-dependencies]
nix = "0.28.0"
shutdown_hooks = "0.1.0"
env_logger = "0.11"
thiserror = "1.0.30"
Expand Down
14 changes: 7 additions & 7 deletions edgedb-tokio/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ impl Builder {
/// 1. [`Builder::credentials_file()`] is not supported
/// 2. [`Builder::dsn()`] is not supported yet (although, will be
/// implemented later restricing `*_file` and `*_env` query args
#[cfg(any(feature = "unstable", feature = "test"))]
#[cfg(any(feature = "unstable", test))]
pub fn constrained_build(&self) -> Result<Config, Error> {
let address = if let Some(unix_path) = &self.unix_path {
let port = self.port.unwrap_or(DEFAULT_PORT);
Expand Down Expand Up @@ -1522,7 +1522,7 @@ impl Builder {
///
/// First boolean item in the tuple is `true` if configuration is complete
/// and can be used for connections.
#[cfg(any(feature = "unstable", feature = "test"))]
#[cfg(any(feature = "unstable", test))]
pub async fn build_no_fail(&self) -> (bool, Config, Vec<Error>) {
self._build_no_fail().await
}
Expand Down Expand Up @@ -1998,14 +1998,14 @@ impl Config {
}

/// Return the same config with changed wait until available timeout
#[cfg(any(feature = "unstable", feature = "test"))]
#[cfg(any(feature = "unstable", test))]
pub fn with_wait_until_available(mut self, wait: Duration) -> Config {
Arc::make_mut(&mut self.0).wait = wait;
self
}

/// Return the same config with changed certificates
#[cfg(any(feature = "unstable", feature = "test"))]
#[cfg(any(feature = "unstable", test))]
pub fn with_pem_certificates(mut self, pem: &str) -> Result<Config, Error> {
validate_certs(pem).context("invalid PEM certificate")?;
let cfg = Arc::make_mut(&mut self.0);
Expand All @@ -2021,21 +2021,21 @@ impl Config {
}

/// Returns true if credentials file is in outdated format
#[cfg(any(feature = "unstable", feature = "test"))]
#[cfg(any(feature = "unstable", test))]
pub fn is_creds_file_outdated(&self) -> bool {
self.0.creds_file_outdated
}

/// Return the certificate store of the config
#[cfg(any(feature = "unstable", feature = "test"))]
#[cfg(any(feature = "unstable", test))]
pub fn root_cert_store(&self) -> Result<rustls::RootCertStore, Error> {
Ok(self.0.root_cert_store())
}

/// Return the same config with changed certificate verifier
///
/// Command-line tool uses this for interactive verifier
#[cfg(any(feature = "unstable", feature = "test"))]
#[cfg(any(feature = "unstable", test))]
pub fn with_cert_verifier(mut self, verifier: Verifier) -> Config {
Arc::make_mut(&mut self.0).verifier = verifier;
self
Expand Down
32 changes: 16 additions & 16 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
buildInputs = [
(fenix_pkgs.fromToolchainFile {
file = ./rust-toolchain.toml;
sha256 = "sha256-opUgs6ckUQCyDxcB9Wy51pqhd0MPGHUVbwRKKPGiwZU=";
sha256 = "sha256-6eN/GKzjVSjEhGO9FhWObkRFaE1Jf+uqMSdQnb8lcB4=";
})
] ++ common;
};
Expand All @@ -63,10 +63,7 @@
# rust beta version
devShells.beta = pkgs.mkShell {
buildInputs = [
(fenix_pkgs.toolchainOf {
channel = "beta";
sha256 = "sha256-q7N1YC9mppPme25wjb81cuOgDXFCkA10Lb1D1GCDv04=";
}).defaultToolchain
fenix_pkgs.beta.defaultToolchain
] ++ common;
};
};
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.78"
channel = "1.80"
components = ["rustc", "cargo", "rust-std", "rust-src", "clippy", "rustfmt", "rust-analyzer"]

0 comments on commit 7b4e9fe

Please sign in to comment.