Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove some obvious comments #505

Merged
merged 1 commit into from
May 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions auraed/src/cells/cell_service/cell_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ use tracing::{info, trace, warn};
*/
macro_rules! do_in_cell {
($self:ident, $cell_name:ident, $function:ident, $request:ident) => {{
// Lock the cells mutex to ensure exclusive access
let mut cells = $self.cells.lock().await;

// Retrieve the client socket for the specified cell
Expand Down Expand Up @@ -158,10 +157,8 @@ impl CellService {
let cell_name = cell.name.clone();
let cell_spec = cell.into();

// Lock the cells mutex to ensure exclusive access
let mut cells = self.cells.lock().await;

// Allocate a new cell with the specified name and specification
let cell = cells.allocate(cell_name, cell_spec)?;

Ok(CellServiceAllocateResponse {
Expand All @@ -170,7 +167,7 @@ impl CellService {
})
}

/// Frees a cell. Will delocate the cell.
/// Frees a cell.
///
/// # Arguments
/// * `request` - A request containing CellServiceFreeRequest.
Expand All @@ -188,7 +185,6 @@ impl CellService {

let mut cells = self.cells.lock().await;

// Free the cell with the specified name
cells.free(&cell_name)?;

Ok(CellServiceFreeResponse::default())
Expand Down Expand Up @@ -226,7 +222,6 @@ impl CellService {
assert!(cell_name.is_none());
info!("CellService: start() executable={:?}", executable);

// Lock the executables mutex to ensure exclusive access
let mut executables = self.executables.lock().await;

// Start the executable and handle any errors
Expand Down Expand Up @@ -352,7 +347,6 @@ impl CellService {

#[tracing::instrument(skip(self))]
async fn list(&self) -> Result<CellServiceListResponse> {
// Lock the cells mutex to ensure exclusive access
let cells = self.cells.lock().await;

// Retrieve all cells and convert them for returning
Expand Down
Loading