1 2 3 4 5 6 7 8 9 10 11 12 13
//! The `remove` command. use crate::{Context, DsError, Result}; pub fn command(ctx: &mut Context, space: String) -> Result { if ctx.db.get_space(&space).is_err() { return Err(DsError::SpaceAlreadyExists(space)); } ctx.db.remove(&space); Ok(()) }