diff --git a/nexus/db-queries/src/db/queries/network_interface.rs b/nexus/db-queries/src/db/queries/network_interface.rs index 2ddf42791f..9f46483376 100644 --- a/nexus/db-queries/src/db/queries/network_interface.rs +++ b/nexus/db-queries/src/db/queries/network_interface.rs @@ -41,26 +41,26 @@ use uuid::Uuid; // States an instance must be in to operate on its network interfaces, in // most situations. -static INSTANCE_STOPPED: Lazy = - Lazy::new(|| db::model::InstanceState::NoVmm); +const INSTANCE_STOPPED: db::model::InstanceState = + db::model::InstanceState::NoVmm; -static INSTANCE_FAILED: Lazy = - Lazy::new(|| db::model::InstanceState::Failed); +const INSTANCE_FAILED: db::model::InstanceState = + db::model::InstanceState::Failed; // An instance can be in the creating state while we manipulate its // interfaces. The intention is for this only to be the case during sagas. -static INSTANCE_CREATING: Lazy = - Lazy::new(|| db::model::InstanceState::Creating); +const INSTANCE_CREATING: db::model::InstanceState = + db::model::InstanceState::Creating; // A sentinel value for the instance state when the instance actually does // not exist. -static INSTANCE_DESTROYED: Lazy = - Lazy::new(|| db::model::InstanceState::Destroyed); +const INSTANCE_DESTROYED: db::model::InstanceState = + db::model::InstanceState::Destroyed; // A sentinel value for the instance state when the instance has an active // VMM, irrespective of that VMM's actual state. -static INSTANCE_RUNNING: Lazy = - Lazy::new(|| db::model::InstanceState::Vmm); +const INSTANCE_RUNNING: db::model::InstanceState = + db::model::InstanceState::Vmm; static NO_INSTANCE_SENTINEL_STRING: Lazy = Lazy::new(|| String::from(NO_INSTANCE_SENTINEL));