mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-18 21:52:30 -04:00
refactor(widget): get rid of function used only once
This commit is contained in:
@@ -230,7 +230,7 @@ impl WidgetMachine {
|
||||
FromWidgetRequest::ContentLoaded {} => {
|
||||
let mut response =
|
||||
vec![Self::send_from_widget_response(raw_request, Ok(JsonObject::new()))];
|
||||
if self.capabilities.is_unset() {
|
||||
if matches!(self.capabilities, CapabilitiesState::Unset) {
|
||||
response.append(&mut self.negotiate_capabilities());
|
||||
}
|
||||
response
|
||||
@@ -665,10 +665,3 @@ enum CapabilitiesState {
|
||||
/// The capabilities have already been negotiated.
|
||||
Negotiated(Capabilities),
|
||||
}
|
||||
|
||||
impl CapabilitiesState {
|
||||
#[must_use]
|
||||
fn is_unset(&self) -> bool {
|
||||
matches!(self, Self::Unset)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user