Skip to content

Commit

Permalink
bump strup (#41)
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Prendes <[email protected]>
  • Loading branch information
jprendes authored Dec 3, 2024
1 parent f8f8ed1 commit b115c42
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 73 deletions.
20 changes: 3 additions & 17 deletions Cargo.lock

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

3 changes: 1 addition & 2 deletions src/hyperlight_common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ flatbuffers = { version = "24.3.25", default-features = false }
anyhow = { version = "1.0.72", default-features = false }
log = "0.4.20"
tracing = { version = "0.1.41", optional = true }
strum = {version = "0.25", default-features = false, features = ["derive"]}
strum_macros = {version = "0.26", features =[]}
strum = {version = "0.26", default-features = false, features = ["derive"]}

[features]
default = ["tracing"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.

use anyhow::{bail, Error, Result};
use log::Level;
use strum_macros::EnumIter;
use strum::EnumIter;
#[cfg(feature = "tracing")]
use tracing::{instrument, Span};

Expand Down
2 changes: 1 addition & 1 deletion src/hyperlight_host/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ crossbeam = "0.8.0"
crossbeam-channel = "0.5.8"
thiserror = "2.0.0"
prometheus = "0.13.3"
strum = { version = "0.25", features = ["derive"] }
strum = { version = "0.26", features = ["derive"] }
tempfile = { version = "3.10", optional = true }
serde_yaml = "0.9"
anyhow = "1.0"
Expand Down
4 changes: 2 additions & 2 deletions src/hyperlight_host/src/hypervisor/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use std::collections::HashMap;
use std::sync::Once;

use once_cell::sync::OnceCell;
use strum::{EnumIter, EnumVariantNames, IntoStaticStr};
use strum::{EnumIter, IntoStaticStr, VariantNames};
use tracing::{instrument, Span};

use crate::metrics::{
Expand Down Expand Up @@ -55,7 +55,7 @@ static HYPERVISOR_METRIC_DEFINITIONS: &[HyperlightMetricDefinition] =
/// The enum is required to derive from EnumIter, EnumVariantNames, IntoStaticStr
/// and strum(serialize_all = "snake_case") performs the name conversion from CamelCase to snake_case
/// when the enum variant is serialized to a string
#[derive(Debug, EnumIter, EnumVariantNames, IntoStaticStr)]
#[derive(Debug, EnumIter, VariantNames, IntoStaticStr)]
#[strum(serialize_all = "snake_case")]
pub(super) enum HypervisorMetric {
NumberOfCancelledGuestExecutions,
Expand Down
4 changes: 2 additions & 2 deletions src/hyperlight_host/src/sandbox/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use std::collections::HashMap;
use std::sync::Once;

use once_cell::sync::OnceCell;
use strum::{EnumIter, EnumVariantNames, IntoStaticStr};
use strum::{EnumIter, IntoStaticStr, VariantNames};
use tracing::{instrument, Span};

use crate::metrics::{
Expand Down Expand Up @@ -87,7 +87,7 @@ static SANDBOX_METRIC_DEFINITIONS: &[HyperlightMetricDefinition] = &[
/// The enum is required to derive from EnumIter, EnumVariantNames, IntoStaticStr
/// and strum(serialize_all = "snake_case") performs the name conversion from CamelCase to snake_case
/// when the enum variant is serialized to a string
#[derive(Debug, EnumIter, EnumVariantNames, IntoStaticStr)]
#[derive(Debug, EnumIter, VariantNames, IntoStaticStr)]
#[strum(serialize_all = "snake_case")]
pub(crate) enum SandboxMetric {
GuestErrorCount,
Expand Down
28 changes: 4 additions & 24 deletions src/tests/rust_guests/callbackguest/Cargo.lock

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

28 changes: 4 additions & 24 deletions src/tests/rust_guests/simpleguest/Cargo.lock

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

0 comments on commit b115c42

Please sign in to comment.