Skip to content

Commit 82d7620

Browse files
authored
Merge pull request #9 from FeatureProbe/chore_repository_version
chore: repository version type string to u128
2 parents ead4f08 + 196cdd9 commit 82d7620

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
edition = "2021"
33
name = "feature-probe-server-sdk"
4-
version = "1.2.3"
4+
version = "1.2.4"
55
license = "Apache-2.0"
66
authors = ["[email protected]"]
77
description = "FeatureProbe Server Side SDK for Rust"

src/evaluate.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -481,9 +481,9 @@ impl Segment {
481481

482482
#[derive(Serialize, Deserialize, Debug, Default, PartialEq)]
483483
pub struct Repository {
484-
pub(crate) segments: HashMap<String, Segment>,
485-
pub(crate) toggles: HashMap<String, Toggle>,
486-
pub(crate) version: Option<String>,
484+
pub segments: HashMap<String, Segment>,
485+
pub toggles: HashMap<String, Toggle>,
486+
pub version: Option<u128>,
487487
}
488488

489489
fn validate_toggle(_toggle: &Toggle) -> Result<(), FPError> {

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ mod sync;
55
mod user;
66

77
pub use crate::config::FPConfig;
8-
pub use crate::evaluate::{load_json, Repository, Segment, Toggle};
8+
pub use crate::evaluate::{load_json, EvalDetail, Repository, Segment, Toggle};
99
pub use crate::feature_probe::FeatureProbe;
1010
pub use crate::user::FPUser;
1111
use headers::{Error, Header, HeaderName, HeaderValue};

src/sync.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ impl Inner {
168168
{
169169
let repo = self.repo.read();
170170
if let Some(version) = &repo.version {
171-
request = request.query(&["version", version]);
171+
request = request.query(&[("version", &version.to_string())]);
172172
}
173173
} // drop repo lock
174174

@@ -209,7 +209,7 @@ impl Inner {
209209
{
210210
let repo = self.repo.read();
211211
if let Some(version) = &repo.version {
212-
request = request.query("version", version)
212+
request = request.query("version", &version.to_string())
213213
}
214214
} // drop repo lock
215215

0 commit comments

Comments
 (0)