Skip to content

Commit

Permalink
fix: satisfy MSRV 1.71.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rasendubi committed Sep 27, 2024
1 parent f5b721f commit 9250f2e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion eppo_core/src/configuration_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ mod tests {
let _ = std::thread::spawn(move || {
store.set_configuration(Arc::new(Configuration::from_server_response(
UniversalFlagConfig {
wire_json: Vec::from(b"test-bytes"),
wire_json: b"test-bytes".to_vec(),
compiled: CompiledFlagsConfig {
created_at: Utc::now(),
environment: Environment {
Expand Down
6 changes: 4 additions & 2 deletions eppo_core/src/context_attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ where
// We can go a step further and remove `AttributeValue::Boolean` altogether
// (from `eppo_core`), forcing it to be converted to a string before any
// evaluation.
acc.categorical
.insert(key.to_owned(), value.to_string().into());
acc.categorical.insert(
key.to_owned(),
Str::from_static_str(if value { "true" } else { "false" }),
);
}
AttributeValue::Null => {
// Nulls are missing values and are ignored.
Expand Down
2 changes: 1 addition & 1 deletion eppo_core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ mod error;
mod sdk_metadata;
mod str;

pub use crate::str::Str;
pub use attributes::{AttributeValue, Attributes};
pub use configuration::Configuration;
pub use context_attributes::ContextAttributes;
pub use error::{Error, EvaluationError, Result};
pub use sdk_metadata::SdkMetadata;
pub use str::Str;

0 comments on commit 9250f2e

Please sign in to comment.