mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 07:41:23 +01:00
factor server_name change check into a reusable fn
This commit is contained in:
parent
c2c6083277
commit
1fd20cdeba
3 changed files with 42 additions and 9 deletions
10
src/error.rs
10
src/error.rs
|
|
@ -65,6 +65,16 @@ pub(crate) enum ServeCommand {
|
|||
#[error("failed to initialize services")]
|
||||
InitializeServices(#[source] crate::utils::error::Error),
|
||||
|
||||
#[error("`server_name` change check failed")]
|
||||
ServerNameChanged(#[from] ServerNameChanged),
|
||||
}
|
||||
|
||||
/// Error generated if `server_name` has changed or if checking this failed
|
||||
// Missing docs are allowed here since that kind of information should be
|
||||
// encoded in the error messages themselves anyway.
|
||||
#[allow(missing_docs)]
|
||||
#[derive(Error, Debug)]
|
||||
pub(crate) enum ServerNameChanged {
|
||||
#[error("failed to check if there are any users")]
|
||||
NonZeroUsers(#[source] crate::utils::error::Error),
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue