breaking: Rename Maestro::new to Maestro::new_without_initialization. This improves UX as it makes it more obvious to users that this method should rarely be used
All checks were successful
Run Check Script / check (pull_request) Successful in -5s

This commit is contained in:
2025-07-02 17:47:23 -04:00
parent a4aa685a4f
commit 6371009c6f
5 changed files with 15 additions and 8 deletions

View File

@@ -19,7 +19,10 @@ pub struct Maestro<T: Topology> {
}
impl<T: Topology> Maestro<T> {
fn new(inventory: Inventory, topology: T) -> Self {
/// Creates a bare maestro without initialization.
///
/// This should rarely be used. Most of the time Maestro::initialize should be used instead.
pub fn new_without_initialization(inventory: Inventory, topology: T) -> Self {
Self {
inventory,
topology,
@@ -29,7 +32,7 @@ impl<T: Topology> Maestro<T> {
}
pub async fn initialize(inventory: Inventory, topology: T) -> Result<Self, InterpretError> {
let instance = Self::new(inventory, topology);
let instance = Self::new_without_initialization(inventory, topology);
instance.prepare_topology().await?;
Ok(instance)
}

View File

@@ -1,12 +1,12 @@
mod feature;
pub mod features;
mod rust;
pub mod oci;
mod rust;
use std::sync::Arc;
pub use oci::*;
pub use feature::*;
use log::info;
pub use oci::*;
pub use rust::*;
use async_trait::async_trait;