Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor maintenance work #335

Merged
merged 2 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"]
Loading