From 846282f5aec8043347f3095bdb5715e329837148 Mon Sep 17 00:00:00 2001 From: Rushmore Mushambi Date: Fri, 8 Dec 2023 11:18:38 +0200 Subject: [PATCH] Support pre-release servers (#3094) --- lib/src/api/mod.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/src/api/mod.rs b/lib/src/api/mod.rs index a17e9ef0..36b39d08 100644 --- a/lib/src/api/mod.rs +++ b/lib/src/api/mod.rs @@ -28,7 +28,7 @@ use std::sync::OnceLock; /// A specialized `Result` type pub type Result = std::result::Result; -const SUPPORTED_VERSIONS: (&str, &str) = (">=1.0.0-beta.9, <2.0.0", "20230701.55918b7c"); +const SUPPORTED_VERSIONS: (&str, &str) = (">=1.0.0, <2.0.0", "20230701.55918b7c"); /// Connection trait implemented by supported engines pub trait Connection: conn::Connection {} @@ -143,7 +143,9 @@ where // invalid version requirements should be caught during development let req = VersionReq::parse(versions).expect("valid supported versions"); let build_meta = BuildMetadata::new(build_meta).expect("valid supported build metadata"); - let version = self.version().await?; + let mut version = self.version().await?; + // we would like to be able to connect to pre-releases too + version.pre = Default::default(); let server_build = &version.build; if !req.matches(&version) { return Err(Error::VersionMismatch {